code: public void connect(String hostName, int port) throws UnknownHostException, IOException {
          if (!sslHelper.isSocketAvailable()) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                  Tr.event(tc, "creating/recreating socket connection to " + hostName + ":" + port);
  
              SSLSocket socket = sslHelper.createSocket(hostName, port);
              in = new BufferedInputStream(socket.getInputStream());
              out = new BufferedOutputStream(socket.getOutputStream());
  
              // seqNumber must only be reset to 1 when connection is initialized (as in this case)
              seqNumber = 1;
  
              // new connection - reset lastUsedTime
              lastUsedTime = System.currentTimeMillis();
          }
      }
docs: Creates a socket using TLS protocol and connects it
  to the specified host and port.
  
  @throws IOException
  @throws UnknownHostException