typedef struct { size_t max_receive_segment_size; size_t max_owned_receive_bytes; size_t max_send_segment_size; size_t max_owned_send_bytes; unsigned long idle_socket_shutdown; char autoPush; } CTL_TCP_SOCKET_OPTIONS_t;
CTL_TCP_SOCKET_OPTIONS_t contains configuration information for a socket.
In lieu of the classic sockets getsockopt and setsockopt functions, the TCP layer presents and receives its options in a single structure.
A client socket should set these options before calling ctl_tcp_connect.
A server socket's only chance at legally manipulating this its options would be during the CTL_TCP_ACCEPT_FN_t callback, but all sockets for a given port are initialized with the CTL_TCP_SOCKET_OPTIONS_t contained in the CTL_TCP_PORT_OPTIONS_t for that port. In general, calling ctl_tcp_set_socket_options for an individual server socket is not required.
The structure has the following members:
This structure should be set prior to a connection being established with a remote TCP. For a client socket, it means that the application layer may only set a socket's options between the calls to ctl_tcp_socket and ctl_tcp_connect. For a server socket, it means that the only place to modify the socket options is within the CTL_TCP_ACCEPT_FN_t callback function.
ctl_tcp_get_socket_options, ctl_tcp_set_socket_options, ctl_tcp_connect