CppServer  1.0.4.0
C++ Server Library
Public Member Functions | Protected Member Functions | Friends | List of all members
CppServer::WS::WSSSession Class Reference

WebSocket secure session. More...

#include <wss_session.h>

Inheritance diagram for CppServer::WS::WSSSession:
CppServer::HTTP::HTTPSSession CppServer::WS::WebSocket CppServer::Asio::SSLSession

Public Member Functions

 WSSSession (const std::shared_ptr< WSSServer > &server)
 
 WSSSession (const WSSSession &)=delete
 
 WSSSession (WSSSession &&)=delete
 
virtual ~WSSSession ()=default
 
WSSSessionoperator= (const WSSSession &)=delete
 
WSSSessionoperator= (WSSSession &&)=delete
 
virtual bool Close ()
 
virtual bool Close (int status)
 
virtual bool Close (int status, const void *buffer, size_t size)
 
virtual bool Close (int status, std::string_view text)
 
size_t SendText (const void *buffer, size_t size)
 
size_t SendText (std::string_view text)
 
size_t SendText (const void *buffer, size_t size, const CppCommon::Timespan &timeout)
 
size_t SendText (std::string_view text, const CppCommon::Timespan &timeout)
 
bool SendTextAsync (const void *buffer, size_t size)
 
bool SendTextAsync (std::string_view text)
 
size_t SendBinary (const void *buffer, size_t size)
 
size_t SendBinary (std::string_view text)
 
size_t SendBinary (const void *buffer, size_t size, const CppCommon::Timespan &timeout)
 
size_t SendBinary (std::string_view text, const CppCommon::Timespan &timeout)
 
bool SendBinaryAsync (const void *buffer, size_t size)
 
bool SendBinaryAsync (std::string_view text)
 
size_t SendClose (int status, const void *buffer, size_t size)
 
size_t SendClose (int status, std::string_view text)
 
size_t SendClose (int status, const void *buffer, size_t size, const CppCommon::Timespan &timeout)
 
size_t SendClose (int status, std::string_view text, const CppCommon::Timespan &timeout)
 
bool SendCloseAsync (int status, const void *buffer, size_t size)
 
bool SendCloseAsync (int status, std::string_view text)
 
size_t SendPing (const void *buffer, size_t size)
 
size_t SendPing (std::string_view text)
 
size_t SendPing (const void *buffer, size_t size, const CppCommon::Timespan &timeout)
 
size_t SendPing (std::string_view text, const CppCommon::Timespan &timeout)
 
bool SendPingAsync (const void *buffer, size_t size)
 
bool SendPingAsync (std::string_view text)
 
size_t SendPong (const void *buffer, size_t size)
 
size_t SendPong (std::string_view text)
 
size_t SendPong (const void *buffer, size_t size, const CppCommon::Timespan &timeout)
 
size_t SendPong (std::string_view text, const CppCommon::Timespan &timeout)
 
bool SendPongAsync (const void *buffer, size_t size)
 
bool SendPongAsync (std::string_view text)
 
std::string ReceiveText ()
 
std::string ReceiveText (const CppCommon::Timespan &timeout)
 
std::vector< uint8_t > ReceiveBinary ()
 
std::vector< uint8_t > ReceiveBinary (const CppCommon::Timespan &timeout)
 
- Public Member Functions inherited from CppServer::HTTP::HTTPSSession
 HTTPSSession (const std::shared_ptr< HTTPSServer > &server)
 
 HTTPSSession (const HTTPSSession &)=delete
 
 HTTPSSession (HTTPSSession &&)=delete
 
virtual ~HTTPSSession ()=default
 
HTTPSSessionoperator= (const HTTPSSession &)=delete
 
HTTPSSessionoperator= (HTTPSSession &&)=delete
 
CppCommon::FileCache & cache () noexcept
 Get the static content cache. More...
 
const CppCommon::FileCache & cache () const noexcept
 
HTTPResponseresponse () noexcept
 Get the HTTP response. More...
 
const HTTPResponseresponse () const noexcept
 
size_t SendResponse ()
 Send the current HTTP response (synchronous) More...
 
size_t SendResponse (const HTTPResponse &response)
 Send the HTTP response (synchronous) More...
 
size_t SendResponseBody (std::string_view body)
 Send the HTTP response body (synchronous) More...
 
size_t SendResponseBody (const void *buffer, size_t size)
 Send the HTTP response body (synchronous) More...
 
size_t SendResponse (const CppCommon::Timespan &timeout)
 Send the current HTTP response with timeout (synchronous) More...
 
size_t SendResponse (const HTTPResponse &response, const CppCommon::Timespan &timeout)
 Send the HTTP response with timeout (synchronous) More...
 
size_t SendResponseBody (std::string_view body, const CppCommon::Timespan &timeout)
 Send the HTTP response body with timeout (synchronous) More...
 
size_t SendResponseBody (const void *buffer, size_t size, const CppCommon::Timespan &timeout)
 Send the HTTP response body with timeout (synchronous) More...
 
bool SendResponseAsync ()
 Send the current HTTP response (asynchronous) More...
 
bool SendResponseAsync (const HTTPResponse &response)
 Send the HTTP response (asynchronous) More...
 
bool SendResponseBodyAsync (std::string_view body)
 Send the HTTP response body (asynchronous) More...
 
bool SendResponseBodyAsync (const void *buffer, size_t size)
 Send the HTTP response body (asynchronous) More...
 
- Public Member Functions inherited from CppServer::Asio::SSLSession
 SSLSession (const std::shared_ptr< SSLServer > &server)
 Initialize the session with a given server. More...
 
 SSLSession (const SSLSession &)=delete
 
 SSLSession (SSLSession &&)=delete
 
virtual ~SSLSession ()=default
 
SSLSessionoperator= (const SSLSession &)=delete
 
SSLSessionoperator= (SSLSession &&)=delete
 
const CppCommon::UUID & id () const noexcept
 Get the session Id. More...
 
std::shared_ptr< SSLServer > & server () noexcept
 Get the server. More...
 
std::shared_ptr< asio::io_service > & io_service () noexcept
 Get the Asio IO service. More...
 
asio::io_service::strand & strand () noexcept
 Get the Asio service strand for serialized handler execution. More...
 
asio::ssl::stream< asio::ip::tcp::socket > & stream () noexcept
 Get the session SSL stream. More...
 
asio::ssl::stream< asio::ip::tcp::socket >::next_layer_type & socket () noexcept
 Get the session socket. More...
 
uint64_t bytes_pending () const noexcept
 Get the number of bytes pending sent by the session. More...
 
uint64_t bytes_sent () const noexcept
 Get the number of bytes sent by the session. More...
 
uint64_t bytes_received () const noexcept
 Get the number of bytes received by the session. More...
 
size_t option_receive_buffer_limit () const noexcept
 Get the option: receive buffer limit. More...
 
size_t option_receive_buffer_size () const
 Get the option: receive buffer size. More...
 
size_t option_send_buffer_limit () const noexcept
 Get the option: send buffer limit. More...
 
size_t option_send_buffer_size () const
 Get the option: send buffer size. More...
 
bool IsConnected () const noexcept
 Is the session connected? More...
 
bool IsHandshaked () const noexcept
 Is the session handshaked? More...
 
virtual bool Disconnect ()
 Disconnect the session. More...
 
virtual size_t Send (const void *buffer, size_t size)
 Send data to the client (synchronous) More...
 
virtual size_t Send (std::string_view text)
 Send text to the client (synchronous) More...
 
virtual size_t Send (const void *buffer, size_t size, const CppCommon::Timespan &timeout)
 Send data to the client with timeout (synchronous) More...
 
virtual size_t Send (std::string_view text, const CppCommon::Timespan &timeout)
 Send text to the client with timeout (synchronous) More...
 
virtual bool SendAsync (const void *buffer, size_t size)
 Send data to the client (asynchronous) More...
 
virtual bool SendAsync (std::string_view text)
 Send text to the client (asynchronous) More...
 
virtual size_t Receive (void *buffer, size_t size)
 Receive data from the client (synchronous) More...
 
virtual std::string Receive (size_t size)
 Receive text from the client (synchronous) More...
 
virtual size_t Receive (void *buffer, size_t size, const CppCommon::Timespan &timeout)
 Receive data from the client with timeout (synchronous) More...
 
virtual std::string Receive (size_t size, const CppCommon::Timespan &timeout)
 Receive text from the client with timeout (synchronous) More...
 
virtual void ReceiveAsync ()
 Receive data from the client (asynchronous) More...
 
void SetupReceiveBufferLimit (size_t limit) noexcept
 Setup option: receive buffer limit. More...
 
void SetupReceiveBufferSize (size_t size)
 Setup option: receive buffer size. More...
 
void SetupSendBufferLimit (size_t limit) noexcept
 Setup option: send buffer limit. More...
 
void SetupSendBufferSize (size_t size)
 Setup option: send buffer size. More...
 

Protected Member Functions

void onDisconnected () override
 Handle session disconnected notification. More...
 
void onReceived (const void *buffer, size_t size) override
 Handle buffer received notification. More...
 
void onReceivedRequestHeader (const HTTP::HTTPRequest &request) override
 Handle HTTP request header received notification. More...
 
void onReceivedRequest (const HTTP::HTTPRequest &request) override
 Handle HTTP request received notification. More...
 
void onReceivedRequestError (const HTTP::HTTPRequest &request, const std::string &error) override
 Handle HTTP request error notification. More...
 
void onWSClose (const void *buffer, size_t size, int status=1000) override
 Handle WebSocket close notification. More...
 
void onWSPing (const void *buffer, size_t size) override
 Handle WebSocket ping notification. More...
 
void onWSError (const std::string &message) override
 Handle WebSocket error notification. More...
 
- Protected Member Functions inherited from CppServer::HTTP::HTTPSSession
virtual void onReceivedCachedRequest (const HTTPRequest &request, std::string_view content)
 Handle HTTP cached request received notification. More...
 
- Protected Member Functions inherited from CppServer::Asio::SSLSession
virtual void onConnected ()
 Handle session connected notification. More...
 
virtual void onHandshaked ()
 Handle session handshaked notification. More...
 
virtual void onSent (size_t sent, size_t pending)
 Handle buffer sent notification. More...
 
virtual void onEmpty ()
 Handle empty send buffer notification. More...
 
virtual void onError (int error, const std::string &category, const std::string &message)
 Handle error notification. More...
 
- Protected Member Functions inherited from CppServer::WS::WebSocket
virtual void onWSConnecting (HTTP::HTTPRequest &request)
 Handle WebSocket client connecting notification. More...
 
virtual void onWSConnected (const HTTP::HTTPResponse &response)
 Handle WebSocket client connected notification. More...
 
virtual bool onWSConnecting (const HTTP::HTTPRequest &request, HTTP::HTTPResponse &response)
 Handle WebSocket server session validating notification. More...
 
virtual void onWSConnected (const HTTP::HTTPRequest &request)
 Handle WebSocket server session connected notification. More...
 
virtual void onWSDisconnected ()
 Handle WebSocket client disconnected notification. More...
 
virtual void onWSReceived (const void *buffer, size_t size)
 Handle WebSocket received notification. More...
 
virtual void onWSPong (const void *buffer, size_t size)
 Handle WebSocket pong notification. More...
 
 WebSocket ()
 
 WebSocket (const WebSocket &)=delete
 
 WebSocket (WebSocket &&)=delete
 
 ~WebSocket ()=default
 
WebSocketoperator= (const WebSocket &)=delete
 
WebSocketoperator= (WebSocket &&)=delete
 
std::string_view ws_nonce () const noexcept
 Get the WebSocket random nonce. More...
 
bool PerformClientUpgrade (const HTTP::HTTPResponse &response, const CppCommon::UUID &id)
 Perform WebSocket client upgrade. More...
 
bool PerformServerUpgrade (const HTTP::HTTPRequest &request, HTTP::HTTPResponse &response)
 Perform WebSocket server upgrade. More...
 
void PrepareSendFrame (uint8_t opcode, bool mask, const void *buffer, size_t size, int status=0)
 Prepare WebSocket send frame. More...
 
void PrepareReceiveFrame (const void *buffer, size_t size)
 Prepare WebSocket receive frame. More...
 
size_t RequiredReceiveFrameSize ()
 Required WebSocket receive frame size. More...
 
void ClearWSBuffers ()
 Clear WebSocket send/receive buffers. More...
 
void InitWSNonce ()
 Initialize WebSocket random nonce. More...
 

Friends

class WSSServer
 

Additional Inherited Members

- Protected Attributes inherited from CppServer::HTTP::HTTPSSession
HTTPRequest _request
 HTTP request. More...
 
HTTPResponse _response
 HTTP response. More...
 
- Protected Attributes inherited from CppServer::WS::WebSocket
bool _ws_handshaked {false}
 Handshaked flag. More...
 
uint8_t _ws_opcode
 Received frame opcode. More...
 
bool _ws_frame_received {false}
 Received frame flag. More...
 
bool _ws_final_received {false}
 Received final flag. More...
 
size_t _ws_header_size {0}
 Received frame header size. More...
 
size_t _ws_payload_size {0}
 Received frame payload size. More...
 
std::vector< uint8_t > _ws_receive_frame_buffer
 Receive frame buffer. More...
 
std::vector< uint8_t > _ws_receive_final_buffer
 Receive final buffer. More...
 
uint8_t _ws_receive_mask [4]
 Receive mask. More...
 
std::mutex _ws_send_lock
 Send buffer lock. More...
 
std::vector< uint8_t > _ws_send_buffer
 Send buffer. More...
 
uint8_t _ws_send_mask [4]
 Send mask. More...
 
std::array< uint8_t, 16 > _ws_nonce
 WebSocket random nonce of 16 bytes. More...
 
- Static Protected Attributes inherited from CppServer::WS::WebSocket
static const uint8_t WS_FIN = 0x80
 Final frame. More...
 
static const uint8_t WS_TEXT = 0x01
 Text frame. More...
 
static const uint8_t WS_BINARY = 0x02
 Binary frame. More...
 
static const uint8_t WS_CLOSE = 0x08
 Close frame. More...
 
static const uint8_t WS_PING = 0x09
 Ping frame. More...
 
static const uint8_t WS_PONG = 0x0A
 Pong frame. More...
 

Detailed Description

WebSocket secure session.

WebSocket secure session is used to read and write data from the connected WebSocket secure client.

Thread-safe.

Examples
wss_chat_server.cpp.

Definition at line 26 of file wss_session.h.

Constructor & Destructor Documentation

◆ WSSSession() [1/3]

CppServer::WS::WSSSession::WSSSession ( const std::shared_ptr< WSSServer > &  server)
explicit
Examples
wss_chat_server.cpp.

Definition at line 15 of file wss_session.cpp.

◆ WSSSession() [2/3]

CppServer::WS::WSSSession::WSSSession ( const WSSSession )
delete

◆ WSSSession() [3/3]

CppServer::WS::WSSSession::WSSSession ( WSSSession &&  )
delete

◆ ~WSSSession()

virtual CppServer::WS::WSSSession::~WSSSession ( )
virtualdefault

Member Function Documentation

◆ Close() [1/4]

virtual bool CppServer::WS::WSSSession::Close ( )
inlinevirtual
Examples
wss_chat_server.cpp.

Definition at line 40 of file wss_session.h.

◆ Close() [2/4]

virtual bool CppServer::WS::WSSSession::Close ( int  status)
inlinevirtual

Definition at line 41 of file wss_session.h.

◆ Close() [3/4]

virtual bool CppServer::WS::WSSSession::Close ( int  status,
const void *  buffer,
size_t  size 
)
inlinevirtual

Definition at line 42 of file wss_session.h.

◆ Close() [4/4]

virtual bool CppServer::WS::WSSSession::Close ( int  status,
std::string_view  text 
)
inlinevirtual

Definition at line 43 of file wss_session.h.

◆ onDisconnected()

void CppServer::WS::WSSSession::onDisconnected ( )
overrideprotectedvirtual

Handle session disconnected notification.

Reimplemented from CppServer::HTTP::HTTPSSession.

Definition at line 20 of file wss_session.cpp.

◆ onReceived()

void CppServer::WS::WSSSession::onReceived ( const void *  buffer,
size_t  size 
)
overrideprotectedvirtual

Handle buffer received notification.

Notification is called when another part of buffer was received from the client.

Parameters
buffer- Received buffer
size- Received buffer size

Reimplemented from CppServer::HTTP::HTTPSSession.

Definition at line 40 of file wss_session.cpp.

◆ onReceivedRequest()

void CppServer::WS::WSSSession::onReceivedRequest ( const HTTP::HTTPRequest request)
overrideprotectedvirtual

Handle HTTP request received notification.

Notification is called when HTTP request was received from the client.

Parameters
request- HTTP request

Reimplemented from CppServer::HTTP::HTTPSSession.

Definition at line 67 of file wss_session.cpp.

◆ onReceivedRequestError()

void CppServer::WS::WSSSession::onReceivedRequestError ( const HTTP::HTTPRequest request,
const std::string &  error 
)
overrideprotectedvirtual

Handle HTTP request error notification.

Notification is called when HTTP request error was received from the client.

Parameters
request- HTTP request
error- HTTP request error

Reimplemented from CppServer::HTTP::HTTPSSession.

Definition at line 81 of file wss_session.cpp.

◆ onReceivedRequestHeader()

void CppServer::WS::WSSSession::onReceivedRequestHeader ( const HTTP::HTTPRequest request)
overrideprotectedvirtual

Handle HTTP request header received notification.

Notification is called when HTTP request header was received from the client.

Parameters
request- HTTP request

Reimplemented from CppServer::HTTP::HTTPSSession.

Definition at line 53 of file wss_session.cpp.

◆ onWSClose()

void CppServer::WS::WSSSession::onWSClose ( const void *  buffer,
size_t  size,
int  status = 1000 
)
inlineoverrideprotectedvirtual

Handle WebSocket close notification.

Reimplemented from CppServer::WS::WebSocket.

Definition at line 99 of file wss_session.h.

◆ onWSError()

void CppServer::WS::WSSSession::onWSError ( const std::string &  message)
inlineoverrideprotectedvirtual

Handle WebSocket error notification.

Reimplemented from CppServer::WS::WebSocket.

Definition at line 103 of file wss_session.h.

◆ onWSPing()

void CppServer::WS::WSSSession::onWSPing ( const void *  buffer,
size_t  size 
)
inlineoverrideprotectedvirtual

Handle WebSocket ping notification.

Reimplemented from CppServer::WS::WebSocket.

Definition at line 101 of file wss_session.h.

◆ operator=() [1/2]

WSSSession& CppServer::WS::WSSSession::operator= ( const WSSSession )
delete

◆ operator=() [2/2]

WSSSession& CppServer::WS::WSSSession::operator= ( WSSSession &&  )
delete

◆ ReceiveBinary() [1/2]

std::vector< uint8_t > CppServer::WS::WSSSession::ReceiveBinary ( )

Definition at line 155 of file wss_session.cpp.

◆ ReceiveBinary() [2/2]

std::vector< uint8_t > CppServer::WS::WSSSession::ReceiveBinary ( const CppCommon::Timespan &  timeout)

Definition at line 186 of file wss_session.cpp.

◆ ReceiveText() [1/2]

std::string CppServer::WS::WSSSession::ReceiveText ( )

Definition at line 93 of file wss_session.cpp.

◆ ReceiveText() [2/2]

std::string CppServer::WS::WSSSession::ReceiveText ( const CppCommon::Timespan &  timeout)

Definition at line 124 of file wss_session.cpp.

◆ SendBinary() [1/4]

size_t CppServer::WS::WSSSession::SendBinary ( const void *  buffer,
size_t  size 
)
inline

Definition at line 54 of file wss_session.h.

◆ SendBinary() [2/4]

size_t CppServer::WS::WSSSession::SendBinary ( const void *  buffer,
size_t  size,
const CppCommon::Timespan &  timeout 
)
inline

Definition at line 56 of file wss_session.h.

◆ SendBinary() [3/4]

size_t CppServer::WS::WSSSession::SendBinary ( std::string_view  text)
inline

Definition at line 55 of file wss_session.h.

◆ SendBinary() [4/4]

size_t CppServer::WS::WSSSession::SendBinary ( std::string_view  text,
const CppCommon::Timespan &  timeout 
)
inline

Definition at line 57 of file wss_session.h.

◆ SendBinaryAsync() [1/2]

bool CppServer::WS::WSSSession::SendBinaryAsync ( const void *  buffer,
size_t  size 
)
inline

Definition at line 58 of file wss_session.h.

◆ SendBinaryAsync() [2/2]

bool CppServer::WS::WSSSession::SendBinaryAsync ( std::string_view  text)
inline

Definition at line 59 of file wss_session.h.

◆ SendClose() [1/4]

size_t CppServer::WS::WSSSession::SendClose ( int  status,
const void *  buffer,
size_t  size 
)
inline

Definition at line 62 of file wss_session.h.

◆ SendClose() [2/4]

size_t CppServer::WS::WSSSession::SendClose ( int  status,
const void *  buffer,
size_t  size,
const CppCommon::Timespan &  timeout 
)
inline

Definition at line 64 of file wss_session.h.

◆ SendClose() [3/4]

size_t CppServer::WS::WSSSession::SendClose ( int  status,
std::string_view  text 
)
inline

Definition at line 63 of file wss_session.h.

◆ SendClose() [4/4]

size_t CppServer::WS::WSSSession::SendClose ( int  status,
std::string_view  text,
const CppCommon::Timespan &  timeout 
)
inline

Definition at line 65 of file wss_session.h.

◆ SendCloseAsync() [1/2]

bool CppServer::WS::WSSSession::SendCloseAsync ( int  status,
const void *  buffer,
size_t  size 
)
inline

Definition at line 66 of file wss_session.h.

◆ SendCloseAsync() [2/2]

bool CppServer::WS::WSSSession::SendCloseAsync ( int  status,
std::string_view  text 
)
inline

Definition at line 67 of file wss_session.h.

◆ SendPing() [1/4]

size_t CppServer::WS::WSSSession::SendPing ( const void *  buffer,
size_t  size 
)
inline

Definition at line 70 of file wss_session.h.

◆ SendPing() [2/4]

size_t CppServer::WS::WSSSession::SendPing ( const void *  buffer,
size_t  size,
const CppCommon::Timespan &  timeout 
)
inline

Definition at line 72 of file wss_session.h.

◆ SendPing() [3/4]

size_t CppServer::WS::WSSSession::SendPing ( std::string_view  text)
inline

Definition at line 71 of file wss_session.h.

◆ SendPing() [4/4]

size_t CppServer::WS::WSSSession::SendPing ( std::string_view  text,
const CppCommon::Timespan &  timeout 
)
inline

Definition at line 73 of file wss_session.h.

◆ SendPingAsync() [1/2]

bool CppServer::WS::WSSSession::SendPingAsync ( const void *  buffer,
size_t  size 
)
inline

Definition at line 74 of file wss_session.h.

◆ SendPingAsync() [2/2]

bool CppServer::WS::WSSSession::SendPingAsync ( std::string_view  text)
inline

Definition at line 75 of file wss_session.h.

◆ SendPong() [1/4]

size_t CppServer::WS::WSSSession::SendPong ( const void *  buffer,
size_t  size 
)
inline

Definition at line 78 of file wss_session.h.

◆ SendPong() [2/4]

size_t CppServer::WS::WSSSession::SendPong ( const void *  buffer,
size_t  size,
const CppCommon::Timespan &  timeout 
)
inline

Definition at line 80 of file wss_session.h.

◆ SendPong() [3/4]

size_t CppServer::WS::WSSSession::SendPong ( std::string_view  text)
inline

Definition at line 79 of file wss_session.h.

◆ SendPong() [4/4]

size_t CppServer::WS::WSSSession::SendPong ( std::string_view  text,
const CppCommon::Timespan &  timeout 
)
inline

Definition at line 81 of file wss_session.h.

◆ SendPongAsync() [1/2]

bool CppServer::WS::WSSSession::SendPongAsync ( const void *  buffer,
size_t  size 
)
inline

Definition at line 82 of file wss_session.h.

◆ SendPongAsync() [2/2]

bool CppServer::WS::WSSSession::SendPongAsync ( std::string_view  text)
inline

Definition at line 83 of file wss_session.h.

◆ SendText() [1/4]

size_t CppServer::WS::WSSSession::SendText ( const void *  buffer,
size_t  size 
)
inline

Definition at line 46 of file wss_session.h.

◆ SendText() [2/4]

size_t CppServer::WS::WSSSession::SendText ( const void *  buffer,
size_t  size,
const CppCommon::Timespan &  timeout 
)
inline

Definition at line 48 of file wss_session.h.

◆ SendText() [3/4]

size_t CppServer::WS::WSSSession::SendText ( std::string_view  text)
inline

Definition at line 47 of file wss_session.h.

◆ SendText() [4/4]

size_t CppServer::WS::WSSSession::SendText ( std::string_view  text,
const CppCommon::Timespan &  timeout 
)
inline

Definition at line 49 of file wss_session.h.

◆ SendTextAsync() [1/2]

bool CppServer::WS::WSSSession::SendTextAsync ( const void *  buffer,
size_t  size 
)
inline
Examples
wss_chat_server.cpp.

Definition at line 50 of file wss_session.h.

◆ SendTextAsync() [2/2]

bool CppServer::WS::WSSSession::SendTextAsync ( std::string_view  text)
inline

Definition at line 51 of file wss_session.h.

Friends And Related Function Documentation

◆ WSSServer

friend class WSSServer
friend

Definition at line 28 of file wss_session.h.


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