Older/Server/WebRTC/SignalServer.h

20 lines
465 B
C
Raw Normal View History

2024-01-24 23:19:53 +08:00
#ifndef __SIGNALSERVER_H__
#define __SIGNALSERVER_H__
#include "Singleton.h"
#include <string>
#include <unordered_map>
class WebSocketSignalSession;
class SignalServer {
public:
void join(const std::string &id, WebSocketSignalSession *client);
void leave(const std::string &id);
WebSocketSignalSession *client(const std::string &id);
private:
std::unordered_map<std::string, WebSocketSignalSession *> m_clients;
};
#endif // __SIGNALSERVER_H__