code: public static SocketTransport connect(InetSocketAddress address, X509Certificate pinnedcert) throws IOException {
  		SSLSocketFactory factory = get_ssl_socket_factory(pinnedcert);
  		Socket s = factory.createSocket(address.getHostString(), address.getPort());
  		return new SocketTransport(s);
  	}
docs: Connects to the mentioned host and port with SSL and checks the certificate against the pinned version.
  
  @param address host:port to connect to
  @param pinnedcert expected certificate of the server
  @return instance of this class
  @throws IOException if establishing the connection fails