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

namespace mfs
{
    static MediaWebSocketService* _instance = nullptr;

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

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