Problem to do the re connection in TCP-IP client

Discuss with MikroElektronika software developers about current library development.
Post Reply
Author
Message
Prof.Wagner
Posts: 126
Joined: 25 Mar 2011 04:35

Problem to do the re connection in TCP-IP client

#1 Post by Prof.Wagner » 01 Dec 2014 17:31

Hi Everyone,

Some body knows how to recovery a connection if the device down by problem of power or some thing that is not possible to use the Net_Ethernet_28j60_disconnectTCP(SOCKET)? My device works just in client mode (PIC32) and if I disconnect it without the command Net_Ethernet_28j60_disconnectTCP(SOCKET) I didn't get to connect again in order to the server. My device send the SYN but the server disconnect it.
Thank you in advanced.
Best regards
Prof. Wagner

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Problem to do the re connection in TCP-IP client

#2 Post by filip » 03 Dec 2014 13:37

Hi,

The server has a keep alive parameter that is set with some reasonable value (60 seconds, for example);
When this period comes to an end, without and packet exchange, the server closes the socket.

In any case, the client must reconnect again, the question is will the server will let this on the same port.
If the port is not of interest, you could try reconnecting with some other ports, until you get connected.

Regards,
Filip.

Post Reply

Return to “Library Development Discussion”