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
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

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

Reply via email to