...
It is possible to enable the Keep-Alive option for a specific socket by using the function NetSock_OptSet()
with with the option NET_SOCK_OPT_SOCK_KEEP_ALIVE
.
Knowing your TCP connection ID, you can also used the API function NetTCP_ConnCfgTxKeepAliveEn()
.
Each time the connection Idle timeout occurs, the stack will send a keep-alive message to probe the other end of the connection. The timeout value for a given TCP connection can be set with the NetSock_OptSet()
function function and the NET_SOCK_OPT_TCP_KEEP_IDLE
option. Else, knowing your TCP connection ID, the API function NetTCP_ConnCfgIdleTimeout()
can can also be use.