![]() |
C++ Rest SDK
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
|
Websocket client class, used to maintain a connection to a remote host for an extended session. More...
#include <ws_client.h>
Public Member Functions | |
| websocket_client () | |
| Creates a new websocket_client. More... | |
| websocket_client (websocket_client_config config) | |
| Creates a new websocket_client. More... | |
| pplx::task< void > | connect (const web::uri &uri) |
| Connects to the remote network destination. The connect method initiates the websocket handshake with the remote network destination, takes care of the protocol upgrade request. More... | |
| pplx::task< void > | send (websocket_outgoing_message msg) |
| Sends a websocket message to the server . More... | |
| pplx::task< websocket_incoming_message > | receive () |
| Receive a websocket message. More... | |
| pplx::task< void > | close () |
| Closes a websocket client connection, sends a close frame to the server and waits for a close message from the server. More... | |
| pplx::task< void > | close (websocket_close_status close_status, const utility::string_t &close_reason=_XPLATSTR("")) |
| Closes a websocket client connection, sends a close frame to the server and waits for a close message from the server. More... | |
| const web::uri & | uri () const |
| Gets the websocket client URI. More... | |
| const websocket_client_config & | config () const |
| Gets the websocket client config object. More... | |
Websocket client class, used to maintain a connection to a remote host for an extended session.
|
inline |
Creates a new websocket_client.
|
inline |
Creates a new websocket_client.
| config | The client configuration object containing the possible configuration options to initialize the websocket_client. |
|
inline |
Closes a websocket client connection, sends a close frame to the server and waits for a close message from the server.
|
inline |
Closes a websocket client connection, sends a close frame to the server and waits for a close message from the server.
| close_status | Endpoint MAY use the following pre-defined status codes when sending a Close frame. |
| close_reason | While closing an established connection, an endpoint may indicate the reason for closure. |
|
inline |
Gets the websocket client config object.
|
inline |
Connects to the remote network destination. The connect method initiates the websocket handshake with the remote network destination, takes care of the protocol upgrade request.
| uri | The uri address to connect. |
|
inline |
Receive a websocket message.
|
inline |
Sends a websocket message to the server .
|
inline |
Gets the websocket client URI.
1.8.10