
#include <fstream>
#include "MediaClientService.h"

namespace mfs
{
    static MediaClientService* _instance = nullptr;

    MediaClientService* MediaClientService::Instance()
    {
        return _instance;
    }

    MediaClientService* MediaClientService::SetupOnce(std::string& sername, int port, std::shared_ptr<uvw::Loop> loop)
    {
        if (_instance)
        {
            delete _instance;
            _instance = nullptr;
        }
        
        _instance = new MediaClientService(sername, port, loop);
        return _instance;
    }
    
}
