My application connects as a client via ethernet to the server process.
Since the server is well known and will not change, UDP and TCP are set using
socket();
setsockopt(SO_REUSEADDR);
bind();
connect();
The connection protocol includes bits sent in both directions.
When I find a connection error, for example. hearbeat timeout, I need to reset the connection.
Is it enough to just connect () to a NULL address and then reconnect () after a short pause or close the box and then reinitialize from scratch?
thank
source
share