Lwip TCP Client disconnect detection.
I am unable to detect if my client is disconnected from server.
if my server sends the close command then i am able to detect but problem arises when the server stops abruptly or power goes down.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-12 10:08 PM
MCU is STM32F207VIT6 (client)
server is windows application.
LWIP library is used.
Is there any ping command?
- Labels:
-
Ethernet
-
STM32F2 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-12 10:33 PM
Ping:
Yes, there is, and it's "processed" in icmp.c as ICMP_ECHO .
So you must have LWIP_ICMP defined to enable ping, in opt.h .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-12 11:02 PM
already set to 1. Will you please elaborate more.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-15 2:31 PM
https://www.nongnu.org/lwip/2_1_x/tcp_8h.html#a780cfac08b02c66948ab94ea974202e8
Parameters
p The received data (or NULL when the connection has been closed!)
Either that or this:
https://www.nongnu.org/lwip/2_1_x/tcp_8h.html#a1b4f9e3551e575c0ef06d6daa7f06e55
