lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] idle connection timeout


From: Noam weissman
Subject: Re: [lwip-users] idle connection timeout
Date: Mon, 15 Sep 2014 23:33:52 +0300

Hi,

Normally closing a connection involves freeing memory or some
other tasks as well.

LwIP has a clean way to do this. Every connection has a poll 
callback option. If you assign a function to the connection (tcp_pool) 
it will be called every poll interval.

If you set poll interval to two it will be called every second. 
You simply add an variable to the open connection to count the time.

Hope that was clear.


BR,
Noam.


-----Original Message-----
From: address@hidden on behalf of mobin.seven
Sent: Mon 9/15/2014 1:11 PM
To: address@hidden
Subject: [lwip-users] idle connection timeout
 
Hi
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));
it always returns -1.
How can I do this(closing idle connection)?
thanks



--
View this message in context: 
http://lwip.100.n7.nabble.com/idle-connection-timeout-tp23252.html
Sent from the lwip-users mailing list archive at Nabble.com.

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

 
 
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer 
viruses.
************************************************************************************







************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer 
viruses.
************************************************************************************



<<winmail.dat>>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]