Synopsis
CTL_STATUS_t ctl_tcp_init(unsigned socket_count,
                          unsigned listener_count,
                          CTL_TCP_GEN_ISS_FN_t issGenCallback);
Description

ctl_tcp_init will attempt to allocate a buffer for its state data from the general heap and then register itself with the IP layer. The buffer allocation will be approximately:

(160 bytes * socket_count) + (48 bytes * listener_count)

Registration with the IP layer requires a small allocation as well. ctl_tcp_init must be invoked during initialization, prior to calling any other function in the TCP group.

A pseudo-random number generating routine, issGenCallback, must be provided to make 'initial send segments', CTL_TCP_GEN_ISS_FN_t.

In general, the free-running accumulator from the hardware timer that drives ctl_get_current_time is used for this purpose so the network library can provide a one-size-fits-all solution.

See Also

CTL_TCP_GEN_ISS_FN_t