Returns a new AF_UNIX {@link ServerSocket} that is bound to the given {@link UNIXSocketAddress}.

@return The new, unbound {@link UNIXServerSocket}.
546286
public static UNIXServerSocket bindOn(final UNIXSocketAddress addr) throws IOException {
	UNIXServerSocket socket = newInstance();
	socket.bind(addr);
	return socket;
    }
406416
@Override
    public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
        final SSLSocketFactory factory = sslCtxt.getSocketFactory();
        final SSLSocket ss = (SSLSocket) factory.createSocket(address, port, localAddress, localPort);

        ss.setEnabledProtocols(protocols);

        return ss;
    }
1181911
public static ServerSocket make_server(int port, String pkcs12Path, String pkcs12Pass)
			throws IOException, KeyStoreException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException, KeyManagementException {
		try (InputStream in = new FileInputStream(pkcs12Path)) {
			return make_server(port, in, pkcs12Pass);
		}
	}
1098871
private SSLSocket getNewSocket() throws IOException {
		String host = getUrl().getHost();
		int port = getPort();
		Socket socketConnection = new Socket();
		InetSocketAddress mapServerAddress = new InetSocketAddress(host, port);
		socketConnection.connect(mapServerAddress, mInitialConnectionTimeout);
		SSLSocket ret = (SSLSocket) mSocketFactory.createSocket(socketConnection, host, port, true);

		ret.setTcpNoDelay(true);
		ret.setWantClientAuth(true);

		// Check if all is good... Will throw IOException if we don't
		// like the other end...
		ret.getSession().getPeerCertificates();

		if (!mHostnameVerifier.verify(mUrl.getHost(), ret.getSession())) {
			throw new IOException("Hostname Verification failed! "
					+ "Did you set ifmapj.communication.verifypeerhost?");
		}

		return ret;
	}
621665
public function createSocket(): Socket
    {
        return new Socket(
                $this->hostname(),
                $this->port(),
                (($this->isHttps()) ? ('ssl://') : (null))
        );
    }
574244
public static ServerBartender currentSelfServer()
  {
    NetworkSystem clusterService = current();
    
    if (clusterService == null)
      throw new IllegalStateException(L.l("{0} is not available in this context",
                                          NetworkSystem.class.getSimpleName()));
    
    return clusterService.selfServer();
  }
524720
public static WebsocketServerTransport create(String bindAddress, int port) {
    Objects.requireNonNull(bindAddress, "bindAddress must not be null");

    HttpServer httpServer = HttpServer.create().host(bindAddress).port(port);
    return create(httpServer);
  }
740377
public static UNIXSocket connectTo(UNIXSocketAddress addr) throws IOException {
	UNIXSocket socket = newInstance();
	socket.connect(addr);
	return socket;
    }
939976
public Socket createSocket(SocketType type)
    {
        // Create and register socket
        Socket socket = context.socket(type);
        socket.setRcvHWM(this.rcvhwm);
        socket.setSndHWM(this.sndhwm);
        sockets.add(socket);
        return socket;
    }
1024054
public static DnsServerAddresses singleton(final InetSocketAddress address) {
        if (address == null) {
            throw new NullPointerException("address");
        }
        if (address.isUnresolved()) {
            throw new IllegalArgumentException("cannot use an unresolved DNS server address: " + address);
        }

        return new SingletonDnsServerAddresses(address);
    }
95664
@Override
  public ServerSocketBar bind(ServerSocketBar ss)
    throws ConfigException, IOException, GeneralSecurityException
  {
    throw new ConfigException(L.l("jsse is not allowed here"));
  }
792208
public static TcpServerTransport create(int port) {
    TcpServer server = TcpServer.create().port(port);
    return create(server);
  }
1342970
static ServerSocketChannelUDT newAcceptorChannelUDT(
            final TypeUDT type) {
        try {
            return SelectorProviderUDT.from(type).openServerSocketChannel();
        } catch (final IOException e) {
            throw new ChannelException("failed to open a server socket channel", e);
        }
    }
1241672
@Override
	public TServerTransport getTransport() throws TTransportException {
		if (serverSocket == null) {
			TSSLTransportParameters params = getServerConfiguration().getSslTransportParameters();
			serverSocket = params == null ? new TServerSocket(getServerPort())
					: TSSLTransportFactory.getServerSocket(getServerPort(), 0, null, params);
		}
		return serverSocket;
	}
537992
public static TcpServerTransport create(String bindAddress, int port) {
    Objects.requireNonNull(bindAddress, "bindAddress must not be null");

    TcpServer server = TcpServer.create().host(bindAddress).port(port);
    return create(server);
  }
1072837
public ServerSetup createCopy(String bindAddress) {
        ServerSetup setup = new ServerSetup(getPort(), bindAddress, getProtocol());
        setup.setServerStartupTimeout(getServerStartupTimeout());
        setup.setConnectionTimeout(getConnectionTimeout());
        setup.setReadTimeout(getReadTimeout());
        setup.setWriteTimeout(getWriteTimeout());
        setup.setVerbose(isVerbose());

        return setup;
    }
860144
public static WebsocketClientTransport create(String bindAddress, int port) {
    Objects.requireNonNull(bindAddress, "bindAddress must not be null");

    TcpClient client = TcpClient.create().host(bindAddress).port(port);
    return create(client);
  }