libnavajo
web server for static and dynamic pages developement in C++
Classes | Public Member Functions | List of all members
WebSocketClient Class Reference

Public Member Functions

 WebSocketClient (WebSocket *ws, HttpRequest *req)
 
void sendTextMessage (const std::string &message, bool fin=true)
 
void sendBinaryMessage (const unsigned char *message, size_t length, bool fin=true)
 
void sendCloseCtrlFrame (const unsigned char *message, size_t length)
 
void sendCloseCtrlFrame (const std::string &reasonMsg="")
 
void sendPingCtrlFrame (const unsigned char *message, size_t length)
 
void sendPingCtrlFrame (const std::string &message)
 
void sendPongCtrlFrame (const unsigned char *message, size_t length)
 
void sendPongCtrlFrame (const std::string &message)
 
HttpRequestgetHttpRequest ()
 
void closeWS ()
 
void closeSend ()
 
void closeRecv ()
 

Member Function Documentation

void WebSocketClient::sendBinaryMessage ( const unsigned char *  message,
size_t  length,
bool  fin = true 
)

Send Binary Message on the websocket

Parameters
requestthe http request object
messagethe content
lengththe message length
finis-it the final fragment of the message ?
void WebSocketClient::sendCloseCtrlFrame ( const unsigned char *  message,
size_t  length 
)

Send Close Message Notification on the websocket

Parameters
requestthe http request object
messagethe closure reason message
lengththe message length
void WebSocketClient::sendCloseCtrlFrame ( const std::string &  reasonMsg = "")

Send Close Message Notification on the websocket

Parameters
requestthe http request object
messagethe closure reason message
void WebSocketClient::sendPingCtrlFrame ( const unsigned char *  message,
size_t  length 
)

Send Ping Message Notification on the websocket

Parameters
requestthe http request object
messagethe content
lengththe message length
void WebSocketClient::sendPingCtrlFrame ( const std::string &  message)

Send Ping Message Notification on the websocket

Parameters
requestthe http request object
messagethe content
void WebSocketClient::sendPongCtrlFrame ( const unsigned char *  message,
size_t  length 
)

Send Pong Message Notification on the websocket

Parameters
requestthe http request object
messagethe content
lengththe message length
void WebSocketClient::sendPongCtrlFrame ( const std::string &  message)

Send Pong Message Notification on the websocket

Parameters
requestthe http request object
messagethe content
void WebSocketClient::sendTextMessage ( const std::string &  message,
bool  fin = true 
)

Send Text Message on the websocket

Parameters
requestthe http request object
messagethe text message
finis-it the final fragment of the message ?

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