[lwip-users] Best way for determining if a TCP connection is dead?

2018-01-24 Thread Chris Seto
I have some code which works great, based on the echo client example. I'm working on hardening it, and I'm wondering with how best to deal with a dead TCP connection as a result of the network link being down (ie, Ethernet cable disconnected). The echo client contains conditions for a software te

Re: [lwip-users] Best way for determining if a TCP connection is dead?

2018-01-24 Thread Chris Seto
Additionally, what is the best way to determine if a TCP connection failed (ie, the server is down)? It seems like the jump occurs between // Fill in IP and connect IP4_ADDR(&DestIPaddr, SERVER_ADDR0, SERVER_ADDR1, SERVER_ADDR2, SERVER_ADDR3); tcp_connect(appPcb, &DestIPaddr, SERVER_PORT, NetworkA

Re: [lwip-users] Best way for determining if a TCP connection is dead?

2018-01-24 Thread Stephen Cowell
I had to access my PHY chip to get the status of the line... using 1.4.1 here on an Atmel SAME4E. ...       gmac_enable_management(GMAC, true);       gmac_phy_read(GMAC, BOARD_GMAC_PHY_ADDR, GMII_BMSR, &ul_stat1);// get status from PHY       gmac_enable_management(GMAC, false);       if ((ul_

Re: [lwip-users] Best way for determining if a TCP connection is dead?

2018-01-24 Thread Joel Cunningham
On 01/24/2018 10:35 AM, Chris Seto wrote: I have some code which works great, based on the echo client example. I'm working on hardening it, and I'm wondering with how best to deal with a dead TCP connection as a result of the network link being down (ie, Ethernet cable disconnected). This

Re: [lwip-users] Best way for determining if a TCP connection is dead?

2018-01-24 Thread goldsi...@gmx.de
On 24.01.2018 18:16, Joel Cunningham wrote: On 01/24/2018 10:35 AM, Chris Seto wrote: I have some code which works great, based on the echo client example. I'm working on hardening it, and I'm wondering with how best to deal with a dead TCP connection as a result of the network link being down