28 explicit SocketPosix(
unsigned txbytes=8192,
unsigned rxbytes=8192);
58 int open_nonblock_socket();
Extensible transmit and receive buffer.
Abstract API for reading byte-streams and packets.
Timer objects are polled after a fixed delay or at a regular interval.
Connect a SatCat5 byte-stream to a Linux or Windows TCP socket.
bool ready()
Is this connection ready to send and receive data?
void close()
Close any open sockets and return to idle.
int m_sock_data
Socket for data transfer, if connected.
util::TimeVal m_last_rx
Time since last receive event.
unsigned m_rate_kbps
Maximum bytes/msec, if applicable.
void set_rate_kbps(unsigned kbps)
Set a Tx/Rx rate-limit in kilobits-per-second, or zero to disable.
bool bind(const satcat5::ip::Port &port)
Prepare to accept connection from a remote client endpoint.
u32 m_flags
Additional status flags.
void data_rcvd(satcat5::io::Readable *src) override
The data_rcvd() callback is polled whenever data is available.
void timer_event() override
Child class MUST override this method.
bool connect(const char *hostname, const satcat5::ip::Port &port)
Attempt connection to a remote server endpoint.
int m_sock_listen
Socket for accept/bind, if applicable.
util::TimeVal m_last_tx
Time since last transmit event.
Buffered I/O wrappers for PacketBuffer.
Core event-processing loop for SatCat5 software.
IPv4 address is a 32-bit unsigned integer.
UDP and TCP ports are both 16-bit unsigned integers.
Timestamp for measuring elapsed time.
TimeRef and TimeVal define the API for monotonic timers.