|
From: | address@hidden |
Subject: | Re: [lwip-users] idle connection timeout |
Date: | Mon, 15 Sep 2014 22:49:02 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |