How to close a tcp-ip socket connection in a common way ?
Posted on 2004-03-30
I'm programming a client server application with TCP/IP socket connection. Program runs successfully.
But when I shutdwon the server and try to restart it ,I sometimes can't build the socket for a while and I receive
an socket errror. After ~ 1 minute waiting - it works. I guess the problem is the socket closing. Can you
recommend a offical handshake procedure? Do you have some code snippets for the client and the server
side program how to close the socket officially.
What do you think. Am I on the right track?
Thanks in advance