20 lines
465 B
C
20 lines
465 B
C
|
#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__
|