Set the server information.

    Args:
      server (str): IP address or hostname of the server.
      port (int): Port number of the server.
170847
def SetServerInformation(self, server, port):
    
    self._host = server
    self._port = port
    logger.debug('Elasticsearch server: {0!s} port: {1:d}'.format(
        server, port))
314019
def define(self):
        """"""
        self.server_def = self.consul.define_server(
                self.name,
                self.server_tpl,
                self.server_tpl_rev,
                self.instance_type,
                self.ssh_key_name,
                tags=self.tags,
                availability_zone=self.availability_zone,
                security_groups=self.security_groups,
                **self.provider_extras
                )
        log.debug('Defined server %s' % self.server_def)
383768
private void configureServer(ServerBartender server)
  {
    // XXX: mixing server/client
    
    ServerNetwork serverNet = _serverMap.get(server.getId());
    
    if (serverNet == null) {
      serverNet = new ServerNetwork(_system, server);
      
      configServer(serverNet, server);

      serverNet.init();
      
      _serverMap.put(server.getId(), serverNet);
    }
  }
319227
def s_connect(self, server, port, r_server=None):
        
        with self.lock:
            if not r_server:
                self.send('CONNECT %s %s' % (server, port), error_check=True)
            else:
                self.send('CONNECT %s %s %s' % (server, port, \
                                    r_server), error_check=True)
929796
def start_server(app: web.Application = None, port: int = None,
                 address: str = None, **kwargs: Any) -> HTTPServer:
    
    app = app or get_app()
    port = port if port is not None else config.port
    address = address if address is not None else config.address

    server = app.listen(port, address=address)
    app.server = server
    app.loop = asyncio.get_event_loop()
    server_config['address'] = address
    for sock in server._sockets.values():
        if sock.family == socket.AF_INET:
            server_config['port'] = sock.getsockname()[1]
            break
    return server
166481
def start_server(self, protocol='TCP', port=5001, mss=None, window=None):
        
        cmd = ['iperf', '-s', '-p', str(port)]
        if not cmp(protocol, 'UDP'):
            cmd.append('-u')
        if mss:
            cmd.extend(['-M', str(mss)])
        if window:
            cmd.extend(['-w', str(window)])
        pid = utils.create_deamon(cmd)
        data = dict()
        data['pid'] = pid
        return data
1092064
def set_tcp_port(self, tcp_port):
        
        if tcp_port is None:
            self.tcp_port = None
            return
        self.tcp_port = int(tcp_port)
955252
def request_server_info(self):
        ''' 

        '''
        if self._server_info is None:
            self._server_info = self._send_request_server_info()
        return self._server_info
989727
def attach_ip(self, server, family='IPv4'):
        
        body = {
            'ip_address': {
                'server': str(server),
                'family': family
            }
        }

        res = self.request('POST', '/ip_address', body)
        return IPAddress(cloud_manager=self, **res['ip_address'])
778221
def _fix_port_assignment(self):
        

        port_name = ''
        port_number = None

        if self._port:
            if isinstance(self._port, int):
                port_number = self._port
                port_name = get_port_name(port_number)
            elif isinstance(self._port, string_types):
                port_name = self._port
                port_number = get_port_number(port_name)
            else:
                raise ValueError('Cannot assign port name/number '
                        'based on port assignment type %r' % self._port)

            self._port = port_number
            self._portname = port_name or ''
1341383
def server(port):
    """"""
    args = ['python', 'manage.py', 'runserver']
    if port:
        args.append(port)
    run.main(args)
678482
def set_server(self, pos, key, value):
        """"""
        self._ports_list[pos][key] = value
1081857
def configure_client(cls, host: str = 'localhost', port: int = 11211, **client_args):
        
        assert check_argument_types()
        client = Client(host, port, **client_args)
        return client
1211955
function setCurrentServer(server) {
    if (server) {
        server.makeCurrent();
        assert.strictEqual(getCurrentServer(), server);
    }
    else {
        init.initOptions.serverUrl = null;
    }
}
123193
public function setServer($server)
    {
        if (is_a($server,'Cetera\\Server')) {
            $this->_server = $server;
            return $this;
        }
        if (is_int($server)) {
            $this->_server = Server::getById($server);
            return $this;        
        }
    }
490923
def start_server(port):
    '''  '''
    s = socket(AF_INET, SOCK_STREAM)
    s.settimeout(None)

    try:
        from socket import SO_REUSEPORT
        s.setsockopt(SOL_SOCKET, SO_REUSEPORT, 1)
    except ImportError:
        s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)

    s.bind(('', port))
    pydev_log.info("Bound to port :%s", port)

    try:
        s.listen(1)
        newSock, _addr = s.accept()
        pydev_log.info("Connection accepted")
        # closing server socket is not necessary but we don't need it
        s.shutdown(SHUT_RDWR)
        s.close()
        return newSock

    except:
        pydev_log.exception("Could not bind to port: %s\n", port)
160296
def do_server(self, arg):
        
        if arg['on']:
            self.server_on()
        elif arg['off']:
            self.server_off()
        elif arg['restart']:
            self.server_restart()
        elif arg['log']:
            self.server_log()
        else:
            self.help_server()