Creates the new server socket.
340727
public boolean connectImpl(String address, int port)
    throws IOException
  {
    _socketTimeout = 600000;

    _nativeFd = -1;
    _isClosed.set(false);

    synchronized (_writeLock) {
      boolean isConnect = nativeConnect(_socketFd, address, port);

      return isConnect;
    }
  }
1039982
public static Socket createSocket(UrlParser urlParser, String host) throws IOException {
    return socketHandler.apply(urlParser, host);
  }
256271
async def start_serving(self, address=None, sockets=None,
                            backlog=100, sslcontext=None):
        
        if self._server:
            raise RuntimeError('Already serving')
        create_server = self._loop.create_server
        server = None
        if sockets:
            for sock in sockets:
                srv = await create_server(self.create_protocol,
                                          sock=sock,
                                          backlog=backlog,
                                          ssl=sslcontext)
                if server:
                    server.sockets.extend(srv.sockets)
                else:
                    server = srv
        elif isinstance(address, tuple):
            server = await create_server(self.create_protocol,
                                         host=address[0],
                                         port=address[1],
                                         backlog=backlog,
                                         ssl=sslcontext)
        else:
            raise RuntimeError('sockets or address must be supplied')
        self._set_server(server)
725737
public static ServerConnector createServerConnectorAndAddToServer(Server server) {
		ServerConnector connector = new ServerConnector(server, JettySetting.createHttpConnectionFactory());

		connector.setHost(setting.getStr("host", "http", "0.0.0.0"));
		connector.setPort(setting.getInt("port", "http", 8090));
		connector.setIdleTimeout(setting.getLong("idle-timeout", "http", 30000L));
		server.addConnector(connector);

		return connector;
	}
1163897
private void initSocket() {
    socket = new Socket();
    try {
      socket.setSoLinger(false, 0);
      socket.setTcpNoDelay(true);
      socket.setSoTimeout(timeout);
    } catch (SocketException sx) {
      LOGGER.error("Could not configure socket.", sx);
    }
  }
182032
public static ServerConnector createSocketConnector(Server server, String host, int port) {
        Assert.notNull(server, "'server' must not be null");
        Assert.notNull(host, "'host' must not be null");

        HttpConnectionFactory httpConnectionFactory = createHttpConnectionFactory();
        ServerConnector connector = new ServerConnector(server, httpConnectionFactory);
        initializeConnector(connector, host, port);
        return connector;
    }
65595
protected function create()
    {

        // Create the remote address
        $remote_addr = sprintf("%s://%s:%d", $this->transport, $this->ip, $this->port);

        // Create context
        $context = stream_context_create([
            'socket' => [
                'bindto' => '0:0', // Bind to any available IP and OS decided port
            ],
        ]);

        // Define these first
        $errno = null;
        $errstr = null;

        // Create the socket
        if (($this->socket =
                @stream_socket_client($remote_addr, $errno, $errstr, $this->timeout, STREAM_CLIENT_CONNECT, $context))
            !== false
        ) {
            // Set the read timeout on the streams
            stream_set_timeout($this->socket, $this->timeout);

            // Set blocking mode
            stream_set_blocking($this->socket, $this->blocking);
        } else {
            // Reset socket
            $this->socket = null;

            // Something bad happened, throw query exception
            throw new Exception(
                __METHOD__ . " - Error creating socket to server {$this->ip}:{$this->port}. Error: " . $errstr,
                $errno
            );
        }
    }
10834
function startServer() {
  var server = require('http').createServer(app);
  var socket = socketio(server, {
    serveClient: true,
    path: '/socket.io-client'
  });
  // Setup SocketIO
  socketConfig(socket);
  return server;
}
743829
def create(self):
        
        logger.info("creating server")
        self.library.Srv_Create.restype = snap7.snap7types.S7Object
        self.pointer = snap7.snap7types.S7Object(self.library.Srv_Create())
506091
protected function createSocket()
    {
        $now = $this->getCurrentTime();
        if ($this->retryTime === null) {
            $attempt = true;
        } else {
            $attempt = ($now >= $this->retryTime);
        }

        if (!$attempt) {
            return;
        }

        $this->socket = $this->makeSocket();
        if ($this->socket !== false) {
            $this->retryTime = null;
            return;
        }

        if ($this->retryTime === null) {
            $this->retryPeriod = $this->retryStart;
        } else {
            $this->retryPeriod *= $this->retryFactor;
            if ($this->retryPeriod > $this->retryMax) {
                $this->retryPeriod = $this->retryMax;
            }
        }
        $this->retryTime = $now + $this->retryPeriod;
    }
208967
public static ServerSocketBar create(int port, int listenBacklog)
    throws IOException
  {
    return create(null, port, listenBacklog, true);
  }
37984
public static SocketIOServer newInstance(int port, SslContext sslContext) {
    return new SocketIOServer(ServerConfiguration.builder()
        .port(port)
        .sslContext(sslContext)
        .build());
  }
501460
def create_server_socket(self, config):
		
		server_socket = WUDPNetworkNativeTransport.create_server_socket(self, config)

		group = socket.inet_aton(str(self.target_socket(config).address()))
		group_membership = struct.pack('4sL', group, socket.INADDR_ANY)
		server_socket.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, group_membership)
		return server_socket
158736
def create_client_socket(self, config):
		
		client_socket = WUDPNetworkNativeTransport.create_client_socket(self, config)
		client_socket.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
		return client_socket
792765
@Override
    public Socket createSocket(String host, int port) throws IOException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "SocketFactory attempting to create socket for host: " + host + " port: " + port);

        // check for SSL addresses
        if (Util.isEncodedHost(host, HOST_PROTOCOL)) {
            String sslConfigName = Util.decodeHostInfo(host);
            host = Util.decodeHost(host);
            return createSSLSocket(host, (char) port, sslConfigName);
        } else {
            return createPlainSocket(host, port);
        }
    }
266029
function createConnection() {

  // create the internal socket object
  var server = new Socket()
    , client = new Socket();

  // pair the sockets
  client.pair = server;
  server.pair = client;

  // register the server side so it is wrapped
  // in a connection and stored as an active connection
  this.connection(server);

  // return the client side of the socket
  return client;
}
98018
protected function configureMasterSocket(): void
    {
        $class = $this->options['socket_master_class'];
        $options = $this->options['socket_master_options'];
        $this->socket = new $class($this->server->getUri(), $options);
    }