mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
24 lines
620 B
C++
24 lines
620 B
C++
#ifndef _WS_HANDLE_MANAGER_H_
|
|
#define _WS_HANDLE_MANAGER_H_
|
|
|
|
#include <iostream>
|
|
#include <websocketpp/server.hpp>
|
|
|
|
class WsHandleManager {
|
|
public:
|
|
WsHandleManager();
|
|
~WsHandleManager();
|
|
|
|
public:
|
|
bool BindHandleToConnection(websocketpp::connection_hdl hdl,
|
|
std::string& connection_id);
|
|
bool ReleaseHandleFromConnection(websocketpp::connection_hdl hdl,
|
|
std::string& connection_id);
|
|
|
|
const std::string& GetConnectionId(websocketpp::connection_hdl hdl);
|
|
websocketpp::connection_hdl GetWsHandle(std::string& connection_id);
|
|
|
|
private:
|
|
};
|
|
|
|
#endif |