ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
esphome::socket::TcpClientLink Class Reference

A link with its own outgoing buffer. More...

#include <tcp_client_link.h>

Inheritance diagram for esphome::socket::TcpClientLink:
esphome::socket::TcpClientLinkBase

Public Member Functions

size_t queue (const uint8_t *data, size_t len)
 Copy into the outgoing buffer; returns how many bytes fit.
 
uint8_t * tx_tail ()
 Direct access to the buffer's free tail.
 
bool flush_tx ()
 Send the front of the buffer; true once it is empty.
 

Protected Attributes

uint8_t tx_ [TX_BUFFER_SIZE] {}
 

Additional Inherited Members

Detailed Description

A link with its own outgoing buffer.

Definition at line 112 of file tcp_client_link.h.

Member Function Documentation

◆ flush_tx()

bool esphome::socket::TcpClientLink::flush_tx ( )
inline

Send the front of the buffer; true once it is empty.

A partial write keeps the rest; inline no-op while nothing is queued.

Definition at line 121 of file tcp_client_link.h.

◆ queue()

size_t esphome::socket::TcpClientLink::queue ( const uint8_t * data,
size_t len )
inline

Copy into the outgoing buffer; returns how many bytes fit.

Definition at line 115 of file tcp_client_link.h.

◆ tx_tail()

uint8_t * esphome::socket::TcpClientLink::tx_tail ( )
inline

Direct access to the buffer's free tail.

Fill at most tx_free() bytes, then tx_commit() the count; neither is bounds checked.

Definition at line 118 of file tcp_client_link.h.

Field Documentation

◆ tx_

uint8_t esphome::socket::TcpClientLink::tx_[TX_BUFFER_SIZE] {}
protected

Definition at line 124 of file tcp_client_link.h.


The documentation for this class was generated from the following file: