title: How to correctly close a socket and then reopen it?
body: <p>I'm developing a game for a class that I am in, and it is about 99% done. However, I realized there is a problem: If the server and client disconnect, and the client attempts to reconnect (and the server is back up and running fine), the client is not making a new connection.</p>
  
  <p>The server and client are both multi-threaded. If I send the client a <code>Kick</code> message, what happens is the client will close its socket. If I reconnect, I get a <code>SocketException</code>: socket closed even though whenever connect is pressed, a new Client is constructed, which is basically just a class that creates a socket and connects to the server with a get/send thread. </p>
  
  <p>Do you think there is anything I am doing illogically? It is like it is attempting to use the old Socket and Client that were constructed, but if I do some <code>println</code> calls, I can see that it does construct a new one and they are in different memory locations.</p>
  
  <p>Thanks!</p>