|
REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
#include <client.h>
Public Member Functions | |
| WebsocketsClient () | |
| WebsocketsClient (std::shared_ptr< network::TcpClient > client) | |
| WebsocketsClient (const WebsocketsClient &other) | |
| WebsocketsClient (const WebsocketsClient &&other) | |
| WebsocketsClient & | operator= (const WebsocketsClient &other) |
| WebsocketsClient & | operator= (const WebsocketsClient &&other) |
| void | addHeader (const std::string key, const std::string value) |
| void | onMessage (const MessageCallback callback) |
| void | onMessage (const PartialMessageCallback callback) |
| void | onEvent (const EventCallback callback) |
| void | onEvent (const PartialEventCallback callback) |
| bool | poll () |
| bool | available (const bool activeTest=false) |
| bool | send (const std::string &&data) |
| bool | send (const std::string &data) |
| bool | send (const char *data) |
| bool | send (const char *data, const size_t len) |
| bool | sendBinary (const std::string data) |
| bool | sendBinary (const char *data, const size_t len) |
| bool | stream (const std::string data="") |
| bool | streamBinary (const std::string data="") |
| bool | end (const std::string data="") |
| void | setFragmentsPolicy (const FragmentsPolicy newPolicy) |
| FragmentsPolicy | getFragmentsPolicy () const |
| WebsocketsMessage | readBlocking () |
| bool | ping (const std::string data="") |
| bool | pong (const std::string data="") |
| void | close (const CloseReason reason=CloseReason_NormalClosure) |
| CloseReason | getCloseReason () const |
| void | setUseMasking (bool useMasking) |
| virtual | ~WebsocketsClient () |
| std::shared_ptr< network::TcpClient > | client () |
Detailed Description
Constructor & Destructor Documentation
◆ WebsocketsClient() [1/4]
| websockets::WebsocketsClient::WebsocketsClient | ( | ) |
Definition at line 11 of file client.cpp.
◆ WebsocketsClient() [2/4]
| FLASHMEM websockets::WebsocketsClient::WebsocketsClient | ( | std::shared_ptr< network::TcpClient > | client | ) |
Definition at line 16 of file client.cpp.
◆ WebsocketsClient() [3/4]
| FLASHMEM websockets::WebsocketsClient::WebsocketsClient | ( | const WebsocketsClient & | other | ) |
Definition at line 24 of file client.cpp.
◆ WebsocketsClient() [4/4]
| FLASHMEM websockets::WebsocketsClient::WebsocketsClient | ( | const WebsocketsClient && | other | ) |
Definition at line 35 of file client.cpp.
◆ ~WebsocketsClient()
|
virtual |
Definition at line 307 of file client.cpp.
References available(), close(), and websockets::CloseReason_GoingAway.
Member Function Documentation
◆ addHeader()
| FLASHMEM void websockets::WebsocketsClient::addHeader | ( | const std::string | key, |
| const std::string | value ) |
Definition at line 112 of file client.cpp.
References websockets::internals::fromInterfaceString().
◆ available()
| FLASHMEM bool websockets::WebsocketsClient::available | ( | const bool | activeTest = false | ) |
Definition at line 255 of file client.cpp.
References websockets::internals::WebsocketsEndpoint::close(), websockets::CloseReason_AbnormalClosure, websockets::ConnectionClosed, and websockets::internals::WebsocketsEndpoint::ping().
Referenced by close(), end(), ping(), poll(), pong(), readBlocking(), send(), sendBinary(), stream(), streamBinary(), and ~WebsocketsClient().
◆ client()
|
inline |
Definition at line 79 of file client.h.
Referenced by onWebsocketMessageCallback().
◆ close()
| void websockets::WebsocketsClient::close | ( | const CloseReason | reason = CloseReason_NormalClosure | ) |
Definition at line 285 of file client.cpp.
References available(), and websockets::internals::WebsocketsEndpoint::close().
Referenced by ~WebsocketsClient().
◆ end()
| bool websockets::WebsocketsClient::end | ( | const std::string | data = "" | ) |
Definition at line 242 of file client.cpp.
References available(), websockets::internals::Continuation, websockets::internals::fromInterfaceString(), and websockets::internals::WebsocketsEndpoint::send().
◆ getCloseReason()
| CloseReason websockets::WebsocketsClient::getCloseReason | ( | ) | const |
Definition at line 293 of file client.cpp.
References websockets::internals::WebsocketsEndpoint::getCloseReason().
◆ getFragmentsPolicy()
| FragmentsPolicy websockets::WebsocketsClient::getFragmentsPolicy | ( | ) | const |
◆ onEvent() [1/2]
| FLASHMEM void websockets::WebsocketsClient::onEvent | ( | const EventCallback | callback | ) |
Definition at line 125 of file client.cpp.
◆ onEvent() [2/2]
| FLASHMEM void websockets::WebsocketsClient::onEvent | ( | const PartialEventCallback | callback | ) |
Definition at line 128 of file client.cpp.
◆ onMessage() [1/2]
| FLASHMEM void websockets::WebsocketsClient::onMessage | ( | const MessageCallback | callback | ) |
Definition at line 117 of file client.cpp.
◆ onMessage() [2/2]
| FLASHMEM void websockets::WebsocketsClient::onMessage | ( | const PartialMessageCallback | callback | ) |
Definition at line 120 of file client.cpp.
◆ operator=() [1/2]
| FLASHMEM WebsocketsClient & websockets::WebsocketsClient::operator= | ( | const WebsocketsClient && | other | ) |
Definition at line 64 of file client.cpp.
◆ operator=() [2/2]
| FLASHMEM WebsocketsClient & websockets::WebsocketsClient::operator= | ( | const WebsocketsClient & | other | ) |
Definition at line 46 of file client.cpp.
◆ ping()
| bool websockets::WebsocketsClient::ping | ( | const std::string | data = "" | ) |
Definition at line 271 of file client.cpp.
References available(), websockets::internals::fromInterfaceString(), and websockets::internals::WebsocketsEndpoint::ping().
◆ poll()
| FLASHMEM bool websockets::WebsocketsClient::poll | ( | ) |
Definition at line 135 of file client.cpp.
References available(), websockets::internals::WebsocketsEndpoint::poll(), and websockets::internals::WebsocketsEndpoint::recv().
◆ pong()
| bool websockets::WebsocketsClient::pong | ( | const std::string | data = "" | ) |
Definition at line 278 of file client.cpp.
References available(), websockets::internals::fromInterfaceString(), and websockets::internals::WebsocketsEndpoint::pong().
◆ readBlocking()
| WebsocketsMessage websockets::WebsocketsClient::readBlocking | ( | ) |
Definition at line 162 of file client.cpp.
References available(), websockets::internals::WebsocketsEndpoint::poll(), and websockets::internals::WebsocketsEndpoint::recv().
◆ send() [1/4]
| bool websockets::WebsocketsClient::send | ( | const char * | data | ) |
Definition at line 185 of file client.cpp.
References send().
◆ send() [2/4]
| FLASHMEM bool websockets::WebsocketsClient::send | ( | const char * | data, |
| const size_t | len ) |
Definition at line 188 of file client.cpp.
References available(), websockets::internals::Continuation, websockets::internals::WebsocketsEndpoint::send(), and websockets::internals::Text.
◆ send() [3/4]
| bool websockets::WebsocketsClient::send | ( | const std::string && | data | ) |
Definition at line 180 of file client.cpp.
References websockets::internals::fromInterfaceString(), and send().
Referenced by onWebsocketMessageCallback(), send(), send(), and send().
◆ send() [4/4]
| bool websockets::WebsocketsClient::send | ( | const std::string & | data | ) |
Definition at line 175 of file client.cpp.
References websockets::internals::fromInterfaceString(), and send().
◆ sendBinary() [1/2]
| FLASHMEM bool websockets::WebsocketsClient::sendBinary | ( | const char * | data, |
| const size_t | len ) |
Definition at line 210 of file client.cpp.
References available(), websockets::internals::Binary, websockets::internals::Continuation, and websockets::internals::WebsocketsEndpoint::send().
◆ sendBinary() [2/2]
| bool websockets::WebsocketsClient::sendBinary | ( | const std::string | data | ) |
Definition at line 204 of file client.cpp.
References websockets::internals::fromInterfaceString(), and sendBinary().
Referenced by sendBinary().
◆ setFragmentsPolicy()
| void websockets::WebsocketsClient::setFragmentsPolicy | ( | const FragmentsPolicy | newPolicy | ) |
Definition at line 250 of file client.cpp.
References websockets::internals::WebsocketsEndpoint::setFragmentsPolicy().
◆ setUseMasking()
|
inline |
Definition at line 75 of file client.h.
References websockets::internals::WebsocketsEndpoint::setUseMasking().
Referenced by websockets::WebsocketsServer::accept().
◆ stream()
| bool websockets::WebsocketsClient::stream | ( | const std::string | data = "" | ) |
Definition at line 226 of file client.cpp.
References available(), websockets::internals::fromInterfaceString(), websockets::internals::WebsocketsEndpoint::send(), and websockets::internals::Text.
◆ streamBinary()
| bool websockets::WebsocketsClient::streamBinary | ( | const std::string | data = "" | ) |
Definition at line 234 of file client.cpp.
References available(), websockets::internals::Binary, websockets::internals::fromInterfaceString(), and websockets::internals::WebsocketsEndpoint::send().
The documentation for this class was generated from the following files:
- lib/communication/src/websockets/client.h
- lib/communication/src/websockets/client.cpp