REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
Loading...
Searching...
No Matches
websockets::network::TcpClient Struct Reference

#include <tcp.h>

Collaboration diagram for websockets::network::TcpClient:

Public Member Functions

 TcpClient (LucidacWebsocketsClient *context)
 
 TcpClient ()
 
bool connect (std::string host, int port)
 
bool poll ()
 
bool available ()
 
void send (std::string data)
 
void send (uint8_t *data, uint32_t len)
 
std::string readLine ()
 
int read (uint8_t *buffer, uint32_t len)
 
void close ()
 
 ~TcpClient ()
 

Public Attributes

LucidacWebsocketsClientcontext
 
EthernetClient * client
 

Detailed Description

Definition at line 19 of file tcp.h.

Constructor & Destructor Documentation

◆ TcpClient() [1/2]

websockets::network::TcpClient::TcpClient ( LucidacWebsocketsClient * context)

Definition at line 9 of file tcp.cpp.

◆ TcpClient() [2/2]

websockets::network::TcpClient::TcpClient ( )
inline

Definition at line 28 of file tcp.h.

◆ ~TcpClient()

websockets::network::TcpClient::~TcpClient ( )
inline

Definition at line 68 of file tcp.h.

Member Function Documentation

◆ available()

bool websockets::network::TcpClient::available ( )
inline

◆ close()

void websockets::network::TcpClient::close ( )
inline

Definition at line 63 of file tcp.h.

Referenced by readLine().

◆ connect()

bool websockets::network::TcpClient::connect ( std::string host,
int port )
inline

Definition at line 30 of file tcp.h.

◆ poll()

bool websockets::network::TcpClient::poll ( )
inline

Definition at line 32 of file tcp.h.

◆ read()

int websockets::network::TcpClient::read ( uint8_t * buffer,
uint32_t len )
inline

Definition at line 61 of file tcp.h.

Referenced by websockets::internals::readUntilSuccessfullOrError().

◆ readLine()

std::string websockets::network::TcpClient::readLine ( )
inline

Definition at line 47 of file tcp.h.

References available(), and close().

◆ send() [1/2]

void websockets::network::TcpClient::send ( std::string data)
inline

Definition at line 41 of file tcp.h.

◆ send() [2/2]

void websockets::network::TcpClient::send ( uint8_t * data,
uint32_t len )
inline

Definition at line 45 of file tcp.h.

Member Data Documentation

◆ client

EthernetClient* websockets::network::TcpClient::client

Definition at line 21 of file tcp.h.

Referenced by available().

◆ context

LucidacWebsocketsClient* websockets::network::TcpClient::context

Definition at line 20 of file tcp.h.


The documentation for this struct was generated from the following files:
  • lib/communication/src/websockets/tcp.h
  • lib/communication/src/websockets/tcp.cpp