lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Issue with netconn_close closing connection before netc


From: Terry Barnaby
Subject: Re: [lwip-users] Issue with netconn_close closing connection before netconn_write's have completed
Date: Fri, 24 May 2019 18:59:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Thanks for the info.

I had enabled "#define LWIP_SO_LINGERĀ  1" in lwipopts.h which did not affect the issue.

But looking at the link you sent I might also have to "struct netconn* nc; nc->linger = 30;" or something like that to set the linger seconds value of a particular netconn connection. I will have a play with that.

Terry

On 23/05/2019 14:45, ricardoschoof wrote:
Hi,
I have fixed my code (although I'm using sockets). It seems the socket
implementation was closing the connection even when there was pending data.
Enabling SO_LINGER cause the application to close the socket after all data
was sent, or a timeout occured.

The netconn solution also has a linger option, this might be the solution
you need?

netconn linger:
https://www.nongnu.org/lwip/2_0_x/structnetconn.html#a25ed06d944da0b0b9e7db5265be3fa3d

For more info on linger see (search for SO_LINGER)
http://man7.org/linux/man-pages/man7/socket.7.html



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

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



reply via email to

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