[En-Nut-Discussion] Socket timeout

Harald Kipp harald.kipp at egnite.de
Sat Oct 12 15:07:36 CEST 2002


Alexander,

By default there's no timeout. You need to call
NutTcpSetSockOpt() to set the timeout in
milliseconds. Here's an example for 5 sec timeout:

u_long to = 5000;
if(NutTcpSetSockOpt(sock, SO_RCVTIMEO, &to, sizeof(to)))
     NutPrintString(0, "Sockopt TO failed\r\n");

Harald




More information about the En-Nut-Discussion mailing list