Can I close and reopen a socket?
- by Roman
I learned an example of usage of sockets. In this example a client sends a request to a server to open a socket and then the server (listening to a specific port) opens a socket and everything is fine, socket is "opened" from both sides (client and server).
But it is still not clear to me how flexible is this stuff. For example, is it possible for the client to close an opened (from both ends) socket and to reopen it again (under condition that the server keeps the socket opened).
Is it possible for the server to "know" that a socket was closed on the client side? Is it possible for the client to know that a socket was closed on the server side?