WebsocketClient.h
Go to the documentation of this file.
Definition: WebsocketConnection.h:60
virtual void send(const char *message, size_t length, ws_frame_type_t type=WS_FRAME_TEXT)
Sends a websocket message from a buffer.
void sendString(const String &message)
Sends a string websocket message.
Definition: WebsocketConnection.h:125
WebsocketClient(HttpConnection *connection)
Definition: WebsocketClient.h:38
void disconnect()
Disconnects websocket client from server.
Definition: WebsocketClient.h:96
int verifyKey(HttpConnection &connection, HttpResponse &response)
HttpConnection * getHttpConnection()
void sendBinary(const uint8_t *data, size_t length)
Sends a binary websocket message.
Definition: WebsocketConnection.h:135
void sendPing(const String &payload=nullptr)
Send websocket ping to server.
Definition: WebsocketClient.h:64
void setBinaryHandler(WebsocketBinaryDelegate handler)
Sets the callback handler to be called after a binary websocket message is received.
Definition: WebsocketConnection.h:209
void sendPong(const String &payload=nullptr)
Send websocket ping to server.
Definition: WebsocketClient.h:75
void setSslInitHandler(Ssl::Session::InitDelegate handler)
Set the SSL session initialisation callback.
Definition: WebsocketClient.h:88
WsConnectionState getState()
Gets the state of the websocket connection.
Definition: WebsocketConnection.h:258
void setConnectionHandler(WebsocketDelegate handler)
Sets the callback handler to be called after successful websocket connection.
Definition: WebsocketConnection.h:191
void setDisconnectionHandler(WebsocketDelegate handler)
Sets the callback handler to be called before closing a websocket connection.
Definition: WebsocketConnection.h:218
Provides http base used for client and server connections.
Definition: HttpConnection.h:27
void close()
Closes a websocket connection (without closing the underlying http connection.
Definition: HttpClientConnection.h:27
Definition: HttpResponse.h:20
void setMessageHandler(WebsocketMessageDelegate handler)
Sets the callback handler to be called after a websocket message is received.
Definition: WebsocketConnection.h:200