Please excuse the noob-level questions but this is the first time I have worked with serversockets.
In the “server” app, the serversocket hands over the inbound connection to a TCPsocket. All fine thus far. Then
- If the client disconnects, the TCPsocket obviously gets an error. Does this cause the TCPsocket to close, or should one manually ( in code ) subsequently issue a close?
- How long do these TCPsockets stay around ( ie: after an error or a close ) or must one try to “nil” them? Really the question is how to clean up after the connection has gone.
- Do these TCPsockets in the array of TCPsockets get re-used, or will their “socket number” keep increasing?