BF2MC-Matchmaker
Public Member Functions | Private Member Functions | List of all members
Websocket::Client Class Reference
Inheritance diagram for Websocket::Client:
Inheritance graph
[legend]
Collaboration diagram for Websocket::Client:
Collaboration graph
[legend]

Public Member Functions

 Client (int socket, struct sockaddr_in address)
 
void Listen ()
 
void Disconnect ()
 
void Send (const atomizes::HTTPMessage &http_response) const
 
void Send (const Json::Value &value) const
 
void onRequest (const std::vector< char > &buffer)
 
- Public Member Functions inherited from Net::Socket
void Close ()
 Closes the socket.
 
std::string GetIP () const
 Gets the IP address associated with the socket. More...
 
void GetIpArray (uint8_t *ip) const
 Gets the IP address associated with the socket as an array of bytes. More...
 
uint16_t GetPort () const
 Gets the port number associated with the socket. More...
 
std::string GetAddress () const
 Gets the full address (IP:Port) associated with the socket. More...
 
std::string GetSocketType () const
 Gets the socket type. More...
 
std::chrono::system_clock::time_point GetLastRecievedTime () const
 Gets the time when the socket last received data. More...
 
void Send (const std::string &msg) const
 Sends a message over the socket. More...
 
void Send (const std::vector< unsigned char > &msg) const
 Sends a message over the socket. More...
 
void UDPSend (const std::string &msg) const
 Sends a UDP message over the socket. More...
 
void UDPSend (const std::vector< unsigned char > &msg) const
 Sends a UDP message over the socket. More...
 
void UpdateLastRecievedTime ()
 Updates the last received time to the current system time.
 
virtual void WTF_WHY_AM_I_HERE_1337 ()
 Empty virtual function required for static_cast in C++. More...
 

Private Member Functions

void _LogTransaction (const std::string &direction, const std::string &response) const
 
std::string _GetSocketAcceptKey (const std::string &websocket_key)
 
std::vector< char > _UnmaskPayload (const std::vector< char > &key, const std::vector< char > &payload)
 

Additional Inherited Members

- Protected Attributes inherited from Net::Socket
int _socket
 
struct sockaddr_in _address
 
std::chrono::system_clock::time_point _recieved_time
 
std::mutex _mutex
 

Detailed Description

Definition at line 23 of file websocket/client.h.


The documentation for this class was generated from the following files: