TCP Options

Configure options for connections that use the Transmission Control Protocol.

Topics

Creating TCP Connections

nw_protocol_copy_tcp_definition

Accesses the system definition of the Transport Control Protocol.

nw_tcp_create_options

Initializes a default set of TCP connection options.

Customizing TCP Options

nw_tcp_options_set_enable_fast_open

Enables TCP Fast Open on a connection.

nw_tcp_options_set_maximum_segment_size

Sets TCP's maximum segment size in bytes.

nw_tcp_options_set_no_delay

Disables Nagle's algorithm for TCP.

nw_tcp_options_set_no_options

Sets TCP into no-options mode.

nw_tcp_options_set_no_push

Sets TCP into no-push mode.

nw_tcp_options_set_retransmit_fin_drop

Causes TCP to drop its connection after not receiving an ACK after a FIN.

nw_tcp_options_set_disable_ack_stretching

Disables TCP acknowledgment stretching.

nw_tcp_options_set_disable_ecn

Disables negotiation of Explicit Congestion Notification markings.

Configuring Keepalives

nw_tcp_options_set_keepalive_idle_time

Sets the number of seconds of idleness that TCP waits before sending keepalive probes.

nw_tcp_options_set_keepalive_count

Sets the number of keepalive probes that TCP sends before terminating the connection.

nw_tcp_options_set_keepalive_interval

Sets the number of seconds that TCP waits between sending keepalive probes.

Setting Timeouts

nw_tcp_options_set_connection_timeout

Sets the number of seconds that TCP waits before timing out its handshake.

nw_tcp_options_set_retransmit_connection_drop_time

Sets the number of seconds that TCP waits between retransmission attempts.

nw_tcp_options_set_persist_timeout

Sets the TCP persist timeout in seconds, as defined by RFC 6429.

Inspecting TCP State

nw_protocol_metadata_is_tcp

Checks whether a metadata object contains TCP connection state.

nw_tcp_get_available_send_buffer

Accesses the number of available bytes in the TCP send buffer.

nw_tcp_get_available_receive_buffer

Accesses the number of available bytes in the TCP receive buffer.

See Also

Network Protocols

TLS Options

Configure options for connections that use Transport Layer Security.

UDP Options

Configure options for connections that use the User Datagram Protocol.

IP Options

Configure Internet Protocol options on connections.

WebSocket Options

Configure options for connections that use WebSocket.

Framer Protocol Options

Create custom protocols to frame applications messages over a connection.