code: private void createSocket() throws Exception {
          // Some socket options, notably setReceiveBufferSize, must be set before the
          // socket is connected. So, first create the socket, then set options, then connect.
          if (m_sslParams != null) {
              SSLSocketFactory factory = m_sslParams.createSSLContext().getSocketFactory();
              m_socket = factory.createSocket(m_host, m_port);
              setSocketOptions();
              ((SSLSocket)m_socket).startHandshake();
          } else {
              m_socket = new Socket();
              setSocketOptions();
              SocketAddress sockAddr = new InetSocketAddress(m_host, m_port);
              m_socket.connect(sockAddr);
          }
      }
docs: Create a socket connection, setting m_socket, using configured parameters.