code: public void close() {
      // Close the underlying streams
      super.close();
  
      // Close the socket
      if (socket != null) {
        try {
          socket.close();
        } catch (IOException iox) {
          LOGGER.warn("Could not close socket.", iox);
        }
        socket = null;
      }
    }
docs: Closes the socket.