code: protected synchronized void disconnect()
      {
          if (socket != null)
          {
              logger.info("Closing socket.");
              try
              {
                  socket.close();
              }
              catch (IOException ex)
              {
                  logger.warn("Unable to close socket: " + ex.getMessage());
              }
              socket = null;
          }
          protocolIdentifier.reset();
      }
docs: Closes the socket connection.