REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
Loading...
Searching...
No Matches
websockets::internals::WebsocketsEndpoint Class Reference

#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)
 
WebsocketsEndpointoperator= (const WebsocketsEndpoint &other)
 
WebsocketsEndpointoperator= (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()

websockets::internals::WebsocketsEndpoint::~WebsocketsEndpoint ( )
virtual

Definition at line 472 of file endpoint.cpp.

Member Function Documentation

◆ close()

void websockets::internals::WebsocketsEndpoint::close ( const CloseReason reason = CloseReason_NormalClosure)

◆ 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)

◆ poll()

FLASHMEM bool websockets::internals::WebsocketsEndpoint::poll ( )

◆ 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 ( )

◆ 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" )

◆ 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()

void websockets::internals::WebsocketsEndpoint::setUseMasking ( bool useMasking)
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: