|
| | WSSClient (const WSSClient &)=delete |
| |
| | WSSClient (WSSClient &&)=delete |
| |
| virtual | ~WSSClient ()=default |
| |
| WSSClient & | operator= (const WSSClient &)=delete |
| |
| WSSClient & | operator= (WSSClient &&)=delete |
| |
| bool | Connect () override |
| | Connect the client (synchronous)
|
| |
| bool | Connect (const std::shared_ptr< Asio::TCPResolver > &resolver) override |
| |
| bool | ConnectAsync () override |
| | Connect the client (asynchronous)
|
| |
| bool | ConnectAsync (const std::shared_ptr< Asio::TCPResolver > &resolver) override |
| |
| 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) |
| |
| virtual bool | CloseAsync () |
| |
| virtual bool | CloseAsync (int status) |
| |
| virtual bool | CloseAsync (int status, const void *buffer, size_t size) |
| |
| virtual bool | CloseAsync (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) |
| |
| | HTTPSClient (const HTTPSClient &)=delete |
| |
| | HTTPSClient (HTTPSClient &&)=delete |
| |
| virtual | ~HTTPSClient ()=default |
| |
| HTTPSClient & | operator= (const HTTPSClient &)=delete |
| |
| HTTPSClient & | operator= (HTTPSClient &&)=delete |
| |
| HTTPRequest & | request () noexcept |
| | Get the HTTP request.
|
| |
| const HTTPRequest & | request () const noexcept |
| |
| size_t | SendRequest () |
| | Send the current HTTP request (synchronous)
|
| |
| size_t | SendRequest (const HTTPRequest &request) |
| | Send the HTTP request (synchronous)
|
| |
| size_t | SendRequestBody (std::string_view body) |
| | Send the HTTP request body (synchronous)
|
| |
| size_t | SendRequestBody (const void *buffer, size_t size) |
| | Send the HTTP request body (synchronous)
|
| |
| size_t | SendRequest (const CppCommon::Timespan &timeout) |
| | Send the current HTTP request with timeout (synchronous)
|
| |
| size_t | SendRequest (const HTTPRequest &request, const CppCommon::Timespan &timeout) |
| | Send the HTTP request with timeout (synchronous)
|
| |
| size_t | SendRequestBody (std::string_view body, const CppCommon::Timespan &timeout) |
| | Send the HTTP request body with timeout (synchronous)
|
| |
| size_t | SendRequestBody (const void *buffer, size_t size, const CppCommon::Timespan &timeout) |
| | Send the HTTP request body with timeout (synchronous)
|
| |
| bool | SendRequestAsync () |
| | Send the current HTTP request (asynchronous)
|
| |
| bool | SendRequestAsync (const HTTPRequest &request) |
| | Send the HTTP request (asynchronous)
|
| |
| bool | SendRequestBodyAsync (std::string_view body) |
| | Send the HTTP request body (asynchronous)
|
| |
| bool | SendRequestBodyAsync (const void *buffer, size_t size) |
| | Send the HTTP request body (asynchronous)
|
| |
| | SSLClient (const std::shared_ptr< Service > &service, const std::shared_ptr< SSLContext > &context, const std::string &address, int port) |
| | Initialize SSL client with a given Asio service, SSL context, server address and port number.
|
| |
| | SSLClient (const std::shared_ptr< Service > &service, const std::shared_ptr< SSLContext > &context, const std::string &address, const std::string &scheme) |
| | Initialize SSL client with a given Asio service, SSL context, server address and scheme name.
|
| |
| | SSLClient (const std::shared_ptr< Service > &service, const std::shared_ptr< SSLContext > &context, const asio::ip::tcp::endpoint &endpoint) |
| | Initialize SSL client with a given Asio service, SSL context and endpoint.
|
| |
| | SSLClient (const SSLClient &)=delete |
| |
| | SSLClient (SSLClient &&client)=delete |
| |
| virtual | ~SSLClient () |
| |
| SSLClient & | operator= (const SSLClient &)=delete |
| |
| SSLClient & | operator= (SSLClient &&client)=delete |
| |
| const CppCommon::UUID & | id () const noexcept |
| | Get the client Id.
|
| |
| std::shared_ptr< Service > & | service () noexcept |
| | Get the Asio service.
|
| |
| std::shared_ptr< asio::io_service > & | io_service () noexcept |
| | Get the Asio IO service.
|
| |
| asio::io_service::strand & | strand () noexcept |
| | Get the Asio service strand for serialized handler execution.
|
| |
| std::shared_ptr< SSLContext > & | context () noexcept |
| | Get the client SSL context.
|
| |
| asio::ip::tcp::endpoint & | endpoint () noexcept |
| | Get the client endpoint.
|
| |
| asio::ssl::stream< asio::ip::tcp::socket > & | stream () noexcept |
| | Get the client SSL stream.
|
| |
| asio::ssl::stream< asio::ip::tcp::socket >::next_layer_type & | socket () noexcept |
| | Get the client socket.
|
| |
| const std::string & | address () const noexcept |
| | Get the server address.
|
| |
| const std::string & | scheme () const noexcept |
| | Get the scheme name.
|
| |
| int | port () const noexcept |
| | Get the server port number.
|
| |
| uint64_t | bytes_pending () const noexcept |
| | Get the number of bytes pending sent by the client.
|
| |
| uint64_t | bytes_sent () const noexcept |
| | Get the number of bytes sent by the client.
|
| |
| uint64_t | bytes_received () const noexcept |
| | Get the number of bytes received by the client.
|
| |
| bool | option_keep_alive () const noexcept |
| | Get the option: keep alive.
|
| |
| bool | option_no_delay () const noexcept |
| | Get the option: no delay.
|
| |
| size_t | option_receive_buffer_limit () const |
| | Get the option: receive buffer limit.
|
| |
| size_t | option_receive_buffer_size () const |
| | Get the option: receive buffer size.
|
| |
| size_t | option_send_buffer_limit () const |
| | Get the option: send buffer limit.
|
| |
| size_t | option_send_buffer_size () const |
| | Get the option: send buffer size.
|
| |
| bool | IsConnected () const noexcept |
| | Is the client connected?
|
| |
| bool | IsHandshaked () const noexcept |
| | Is the session handshaked?
|
| |
| virtual bool | Connect (const std::shared_ptr< TCPResolver > &resolver) |
| | Connect the client using the given DNS resolver (synchronous)
|
| |
| virtual bool | Disconnect () |
| | Disconnect the client (synchronous)
|
| |
| virtual bool | Reconnect () |
| | Reconnect the client (synchronous)
|
| |
| virtual bool | ConnectAsync (const std::shared_ptr< TCPResolver > &resolver) |
| | Connect the client using the given DNS resolver (asynchronous)
|
| |
| virtual bool | DisconnectAsync () |
| | Disconnect the client (asynchronous)
|
| |
| virtual bool | ReconnectAsync () |
| | Reconnect the client (asynchronous)
|
| |
| virtual size_t | Send (const void *buffer, size_t size) |
| | Send data to the server (synchronous)
|
| |
| virtual size_t | Send (std::string_view text) |
| | Send text to the server (synchronous)
|
| |
| virtual size_t | Send (const void *buffer, size_t size, const CppCommon::Timespan &timeout) |
| | Send data to the server with timeout (synchronous)
|
| |
| virtual size_t | Send (std::string_view text, const CppCommon::Timespan &timeout) |
| | Send text to the server with timeout (synchronous)
|
| |
| virtual bool | SendAsync (const void *buffer, size_t size) |
| | Send data to the server (asynchronous)
|
| |
| virtual bool | SendAsync (std::string_view text) |
| | Send text to the server (asynchronous)
|
| |
| virtual size_t | Receive (void *buffer, size_t size) |
| | Receive data from the server (synchronous)
|
| |
| virtual std::string | Receive (size_t size) |
| | Receive text from the server (synchronous)
|
| |
| virtual size_t | Receive (void *buffer, size_t size, const CppCommon::Timespan &timeout) |
| | Receive data from the server with timeout (synchronous)
|
| |
| virtual std::string | Receive (size_t size, const CppCommon::Timespan &timeout) |
| | Receive text from the server with timeout (synchronous)
|
| |
| virtual void | ReceiveAsync () |
| | Receive data from the server (asynchronous)
|
| |
| void | SetupKeepAlive (bool enable) noexcept |
| | Setup option: keep alive.
|
| |
| void | SetupNoDelay (bool enable) noexcept |
| | Setup option: no delay.
|
| |
| void | SetupReceiveBufferLimit (size_t limit) |
| | Setup option: receive buffer limit.
|
| |
| void | SetupReceiveBufferSize (size_t size) |
| | Setup option: receive buffer size.
|
| |
| void | SetupSendBufferLimit (size_t limit) |
| | Setup option: send buffer limit.
|
| |
| void | SetupSendBufferSize (size_t size) |
| | Setup option: send buffer size.
|
| |
|
| void | onHandshaked () override |
| | Handle session handshaked notification.
|
| |
| void | onDisconnected () override |
| | Handle client disconnected notification.
|
| |
| void | onReceived (const void *buffer, size_t size) override |
| | Handle buffer received notification.
|
| |
| void | onReceivedResponseHeader (const HTTP::HTTPResponse &response) override |
| | Handle HTTP response header received notification.
|
| |
| void | onReceivedResponse (const HTTP::HTTPResponse &response) override |
| | Handle HTTP response received notification.
|
| |
| void | onReceivedResponseError (const HTTP::HTTPResponse &response, const std::string &error) override |
| | Handle HTTP response error notification.
|
| |
| void | onWSClose (const void *buffer, size_t size, int status=1000) override |
| | Handle WebSocket close notification.
|
| |
| void | onWSPing (const void *buffer, size_t size) override |
| | Handle WebSocket ping notification.
|
| |
| void | onWSError (const std::string &message) override |
| | Handle WebSocket error notification.
|
| |
| virtual void | onConnected () |
| | Handle client connected notification.
|
| |
| virtual void | onSent (size_t sent, size_t pending) |
| | Handle buffer sent notification.
|
| |
| virtual void | onEmpty () |
| | Handle empty send buffer notification.
|
| |
| virtual void | onError (int error, const std::string &category, const std::string &message) |
| | Handle error notification.
|
| |
| virtual void | onWSConnecting (HTTP::HTTPRequest &request) |
| | Handle WebSocket client connecting notification.
|
| |
| virtual void | onWSConnected (const HTTP::HTTPResponse &response) |
| | Handle WebSocket client connected notification.
|
| |
| virtual bool | onWSConnecting (const HTTP::HTTPRequest &request, HTTP::HTTPResponse &response) |
| | Handle WebSocket server session validating notification.
|
| |
| virtual void | onWSConnected (const HTTP::HTTPRequest &request) |
| | Handle WebSocket server session connected notification.
|
| |
| virtual void | onWSDisconnected () |
| | Handle WebSocket client disconnected notification.
|
| |
| virtual void | onWSReceived (const void *buffer, size_t size) |
| | Handle WebSocket received notification.
|
| |
| virtual void | onWSPong (const void *buffer, size_t size) |
| | Handle WebSocket pong notification.
|
| |
| | WebSocket () |
| |
| | WebSocket (const WebSocket &)=delete |
| |
| | WebSocket (WebSocket &&)=delete |
| |
| | ~WebSocket ()=default |
| |
| WebSocket & | operator= (const WebSocket &)=delete |
| |
| WebSocket & | operator= (WebSocket &&)=delete |
| |
| std::string_view | ws_nonce () const noexcept |
| | Get the WebSocket random nonce.
|
| |
| bool | PerformClientUpgrade (const HTTP::HTTPResponse &response, const CppCommon::UUID &id) |
| | Perform WebSocket client upgrade.
|
| |
| bool | PerformServerUpgrade (const HTTP::HTTPRequest &request, HTTP::HTTPResponse &response) |
| | Perform WebSocket server upgrade.
|
| |
| void | PrepareSendFrame (uint8_t opcode, bool mask, const void *buffer, size_t size, int status=0) |
| | Prepare WebSocket send frame.
|
| |
| void | PrepareReceiveFrame (const void *buffer, size_t size) |
| | Prepare WebSocket receive frame.
|
| |
| size_t | RequiredReceiveFrameSize () |
| | Required WebSocket receive frame size.
|
| |
| void | ClearWSBuffers () |
| | Clear WebSocket send/receive buffers.
|
| |
| void | InitWSNonce () |
| | Initialize WebSocket random nonce.
|
| |