Sorry to leave your post unanswered for so long.
when we lost this connection for any reason, the other board don’t see it and I have to reboot it
That sounds a bit contradictional: the SAM4E, a TCP client, looses a connection and the server is not aware of it?
Or have you rebooted the client without shutting down the connection, maybe?
How do you notice that you loose the connection in the first instance?
return an error, what is the error number?
There is no method of just sending a RST flag, except by closing the socket (
). But if the peer is just keeping silent, he will never see a RST flag.
As long as the connection is still alive, and you want to force a disconnection, you can call
. After calling it, keep on calling
, until it returns an error.
If the connection gets lost because your client has rebooted, and the server doesn’t allow you to make a connection, I’m afraid you’ll have to look at the software running on the server. Did you write that also? What OS is it using?
Please give more info