File syn_transport_tcp.c¶
FileList > net > syn_transport_tcp.c
Go to the source code of this file
Bridge for syn_transport over a TCP socket.
#include "../util/syn_assert.h"#include "syn_transport_tcp.h"#include <string.h>
Public Functions¶
| Type | Name |
|---|---|
| void | syn_transport_tcp_init (SYN_Transport * t, SYN_TransportTcp * tcp, SYN_Socket sock) Initialize a TCP transport bridge. |
Public Static Functions¶
| Type | Name |
|---|---|
| bool | tcp_recv (uint8_t * data, size_t max_len, size_t * out_len, void * ctx) TCP transport receive callback — length-prefixed framing. |
| bool | tcp_send (const uint8_t * data, size_t len, void * ctx) TCP transport send callback — length-prefixed framing. |
Public Functions Documentation¶
function syn_transport_tcp_init¶
Initialize a TCP transport bridge.
Configures the transport interface vtable with the socket-specific operations.
Parameters:
tPointer to the parent transport structure to configure.tcpPointer to the TCP transport context structure to associate.sockConnected TCP socket to bind to this transport.
Public Static Functions Documentation¶
function tcp_recv¶
TCP transport receive callback — length-prefixed framing.
Parameters:
data[out] Buffer for received data.max_lenBuffer capacity.out_len[out] Received length.ctxTransport context (SYN_TransportTcp *).
Returns:
true if a complete packet was received.
function tcp_send¶
TCP transport send callback — length-prefixed framing.
Parameters:
dataPacket data.lenPacket length.ctxTransport context (SYN_TransportTcp *).
Returns:
true if sent.
The documentation for this class was generated from the following file src/syntropic/net/syn_transport_tcp.c