mobin.seven wrote:
I want to close idle connections on server side with 15s timeout.
Is  SO_RCVTIMEO what I need?
I use this line:
int timeout = 15000;
lwip_setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout));

Where did you get that line from? lwIP tries to implement the standard. And the standard says (google for "opengroup so_rcvtimeo" and you find it) that it "accepts a timeval structure" for SO_RCVTIMEO. I guess you have been using winsock before (they use a DWORD pointer with miliseconds)? Winsock is in most cases not a good example when trying to write portable code :-)


Simon

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to