REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
#include <endpoint.h>
Public Member Functions | |
WebsocketsEndpoint (std::shared_ptr< network::TcpClient > socket, FragmentsPolicy fragmentsPolicy=FragmentsPolicy_Aggregate) | |
WebsocketsEndpoint (const WebsocketsEndpoint &other) | |
WebsocketsEndpoint (const WebsocketsEndpoint &&other) | |
WebsocketsEndpoint & | operator= (const WebsocketsEndpoint &other) |
WebsocketsEndpoint & | operator= (const WebsocketsEndpoint &&other) |
void | setInternalSocket (std::shared_ptr< network::TcpClient > socket) |
bool | poll () |
WebsocketsMessage | recv () |
bool | send (const char *data, const size_t len, const uint8_t opcode, const bool fin, const bool mask, const char *maskingKey="\00\00\00\00") |
bool | send (const std::string &data, const uint8_t opcode, const bool fin, const bool mask, const char *maskingKey="\00\00\00\00") |
bool | send (const char *data, const size_t len, const uint8_t opcode, const bool fin) |
bool | send (const std::string &data, const uint8_t opcode, const bool fin) |
bool | ping (const std::string &msg) |
bool | ping (const std::string &&msg) |
bool | pong (const std::string &msg) |
bool | pong (const std::string &&msg) |
void | close (const CloseReason reason=CloseReason_NormalClosure) |
CloseReason | getCloseReason () const |
void | setFragmentsPolicy (const FragmentsPolicy newPolicy) |
FragmentsPolicy | getFragmentsPolicy () const |
void | setUseMasking (bool useMasking) |
virtual | ~WebsocketsEndpoint () |
Detailed Description
Definition at line 35 of file endpoint.h.
Constructor & Destructor Documentation
◆ WebsocketsEndpoint() [1/3]
FLASHMEM websockets::internals::WebsocketsEndpoint::WebsocketsEndpoint | ( | std::shared_ptr< network::TcpClient > | socket, |
FragmentsPolicy | fragmentsPolicy = FragmentsPolicy_Aggregate ) |
Definition at line 72 of file endpoint.cpp.
◆ WebsocketsEndpoint() [2/3]
websockets::internals::WebsocketsEndpoint::WebsocketsEndpoint | ( | const WebsocketsEndpoint & | other | ) |
Definition at line 80 of file endpoint.cpp.
◆ WebsocketsEndpoint() [3/3]
websockets::internals::WebsocketsEndpoint::WebsocketsEndpoint | ( | const WebsocketsEndpoint && | other | ) |
Definition at line 87 of file endpoint.cpp.
◆ ~WebsocketsEndpoint()
|
virtual |
Definition at line 472 of file endpoint.cpp.
Member Function Documentation
◆ close()
void websockets::internals::WebsocketsEndpoint::close | ( | const CloseReason | reason = CloseReason_NormalClosure | ) |
Definition at line 413 of file endpoint.cpp.
References websockets::internals::Close, websockets::CloseReason_None, and send().
Referenced by websockets::WebsocketsClient::available(), and websockets::WebsocketsClient::close().
◆ getCloseReason()
CloseReason websockets::internals::WebsocketsEndpoint::getCloseReason | ( | ) | const |
Definition at line 430 of file endpoint.cpp.
Referenced by websockets::WebsocketsClient::getCloseReason().
◆ getFragmentsPolicy()
FragmentsPolicy websockets::internals::WebsocketsEndpoint::getFragmentsPolicy | ( | ) | const |
Definition at line 470 of file endpoint.cpp.
◆ operator=() [1/2]
FLASHMEM WebsocketsEndpoint & websockets::internals::WebsocketsEndpoint::operator= | ( | const WebsocketsEndpoint && | other | ) |
Definition at line 109 of file endpoint.cpp.
◆ operator=() [2/2]
FLASHMEM WebsocketsEndpoint & websockets::internals::WebsocketsEndpoint::operator= | ( | const WebsocketsEndpoint & | other | ) |
Definition at line 95 of file endpoint.cpp.
◆ ping() [1/2]
bool websockets::internals::WebsocketsEndpoint::ping | ( | const std::string && | msg | ) |
Definition at line 441 of file endpoint.cpp.
References websockets::internals::Ping, and send().
◆ ping() [2/2]
bool websockets::internals::WebsocketsEndpoint::ping | ( | const std::string & | msg | ) |
Definition at line 432 of file endpoint.cpp.
References websockets::internals::Ping, and send().
Referenced by websockets::WebsocketsClient::available(), and websockets::WebsocketsClient::ping().
◆ poll()
FLASHMEM bool websockets::internals::WebsocketsEndpoint::poll | ( | ) |
Definition at line 128 of file endpoint.cpp.
Referenced by websockets::WebsocketsClient::poll(), and websockets::WebsocketsClient::readBlocking().
◆ pong() [1/2]
bool websockets::internals::WebsocketsEndpoint::pong | ( | const std::string && | msg | ) |
Definition at line 459 of file endpoint.cpp.
References websockets::internals::Pong, and send().
◆ pong() [2/2]
bool websockets::internals::WebsocketsEndpoint::pong | ( | const std::string & | msg | ) |
Definition at line 450 of file endpoint.cpp.
References websockets::internals::Pong, and send().
Referenced by websockets::WebsocketsClient::pong().
◆ recv()
WebsocketsMessage websockets::internals::WebsocketsEndpoint::recv | ( | ) |
Definition at line 315 of file endpoint.cpp.
Referenced by websockets::WebsocketsClient::poll(), and websockets::WebsocketsClient::readBlocking().
◆ send() [1/4]
bool websockets::internals::WebsocketsEndpoint::send | ( | const char * | data, |
const size_t | len, | ||
const uint8_t | opcode, | ||
const bool | fin ) |
Definition at line 345 of file endpoint.cpp.
References send().
◆ send() [2/4]
bool websockets::internals::WebsocketsEndpoint::send | ( | const char * | data, |
const size_t | len, | ||
const uint8_t | opcode, | ||
const bool | fin, | ||
const bool | mask, | ||
const char * | maskingKey = "\00\00\00\00" ) |
Definition at line 387 of file endpoint.cpp.
References __TINY_WS_INTERNAL_DEFAULT_MASK, and websockets::internals::remaskData().
Referenced by close(), websockets::WebsocketsClient::end(), ping(), ping(), pong(), pong(), send(), send(), send(), websockets::WebsocketsClient::send(), websockets::WebsocketsClient::sendBinary(), websockets::WebsocketsClient::stream(), and websockets::WebsocketsClient::streamBinary().
◆ send() [3/4]
bool websockets::internals::WebsocketsEndpoint::send | ( | const std::string & | data, |
const uint8_t | opcode, | ||
const bool | fin ) |
Definition at line 349 of file endpoint.cpp.
References send().
◆ send() [4/4]
bool websockets::internals::WebsocketsEndpoint::send | ( | const std::string & | data, |
const uint8_t | opcode, | ||
const bool | fin, | ||
const bool | mask, | ||
const char * | maskingKey = "\00\00\00\00" ) |
Definition at line 353 of file endpoint.cpp.
References send().
◆ setFragmentsPolicy()
void websockets::internals::WebsocketsEndpoint::setFragmentsPolicy | ( | const FragmentsPolicy | newPolicy | ) |
Definition at line 468 of file endpoint.cpp.
Referenced by websockets::WebsocketsClient::setFragmentsPolicy().
◆ setInternalSocket()
FLASHMEM void websockets::internals::WebsocketsEndpoint::setInternalSocket | ( | std::shared_ptr< network::TcpClient > | socket | ) |
Definition at line 123 of file endpoint.cpp.
◆ setUseMasking()
|
inline |
Definition at line 70 of file endpoint.h.
Referenced by websockets::WebsocketsClient::setUseMasking().
The documentation for this class was generated from the following files:
- lib/communication/src/websockets/endpoint.h
- lib/communication/src/websockets/endpoint.cpp