Sets the server information.

    Args:
      server (str): hostname or IP address of the database server.
      port (int): port number of the database server.
480826
def SetServerInformation(self, server, port):
    
    self._host = server
    self._port = port
1131166
protected function setServer()
	{
		$server = $this->config->get('gateway.zarinpal.server', 'germany');
		switch ($server) {
			case 'iran':
				$this->serverUrl = $this->iranServer;
				break;
                
			case 'test':
				$this->serverUrl = $this->sandboxServer;
				$this->gateUrl = $this->sandboxGateUrl;
				break;

			case 'germany':
			default:
				$this->serverUrl = $this->germanyServer;
				break;
		}
	}
238945
def hostname(self, value):
        
        if value is None:
            value = socket.gethostname()
        self._hostname = value
678482
def set_server(self, pos, key, value):
        """"""
        self._ports_list[pos][key] = value
467427
def setDatabase(self, database):
        
        self._database = database
        if self.thread():
            tid = threading.current_thread().ident
            self._databaseThreadId = tid
300361
def set_key(key, value, host=None, port=None, db=None, password=None):
    '''
    
    '''
    server = _connect(host, port, db, password)
    return server.set(key, value)
1175619
def setFDs(self):
        
        # 0 corresponds to stdin, 1 to stdout, 2 to stderr
        self.childFDs = {0: 0, 1: 1, 2: 2}
        self.fds = {}
        for name in self.servers:
            self.port = self.hendrix.get_port(name)
            fd = self.port.fileno()
            self.childFDs[fd] = fd
            self.fds[name] = fd
1050621
public HostPort setPassive(int port, int queue)
        throws IOException{

        if (serverSocket == null) {
            ServerSocketFactory factory =
                ServerSocketFactory.getDefault();
            serverSocket = factory.createServerSocket(port, queue);
        }

        session.serverMode = Session.SERVER_PASSIVE;

        String address = Util.getLocalHostAddress();
        int localPort = serverSocket.getLocalPort();

        if (remoteControlChannel.isIPv6()) {
            String version = HostPort6.getIPAddressVersion(address);
            session.serverAddress =
                new HostPort6(version, address, localPort);
        } else {
            session.serverAddress =
                new HostPort(address, localPort);
        }

        logger.debug("started passive server at port " +
                     session.serverAddress.getPort());
        return session.serverAddress;

    }
787922
def add_single(self, hostname, ports, nickname=None, **kws):
        '''
            
        '''
        nickname = nickname or hostname

        self[hostname.lower()] = ServerInfo(nickname, hostname, ports, **kws)
259344
public void setServers(java.util.Collection<ListedServer> servers) {
        if (servers == null) {
            this.servers = null;
            return;
        }

        this.servers = new java.util.ArrayList<ListedServer>(servers);
    }
1104572
private function setServer()
    {
        if (isset($_SERVER)) {
            foreach ($_SERVER as $k => $v) {
                $this->log->debug("[ SERVER Params ]" . $k . ": " . $v, []);
                $this->server->$k = $v;
                $this->parameters["server"][$k] = $v;
            }
            unset($_SERVER);
        }
    }
717258
protected void setServerProtocol(String serverProtocol) {

        if (CmsStringUtil.isEmpty(serverProtocol) || (WILDCARD.equals(serverProtocol))) {
            m_serverProtocol = WILDCARD;
        } else {
            int pos = serverProtocol.indexOf("/");
            if (pos > 0) {
                m_serverProtocol = serverProtocol.substring(0, pos).toLowerCase();
            } else {
                m_serverProtocol = serverProtocol.toLowerCase().trim();
            }
        }
    }
726949
def _set_server_known(cls, host, port):
        
        with PostgreSql._known_servers_lock:
            PostgreSql._known_servers.add((host, port))
1313358
def server_bind(self):
        """"""
        socketserver.TCPServer.server_bind(self)
        host, port = self.socket.getsockname()[:2]
        self.server_name = socket.getfqdn(host)
        self.server_port = port
689887
def start(self, tcpport=102):
        
        if tcpport != 102:
            logger.info("setting server TCP port to %s" % tcpport)
            self.set_param(snap7.snap7types.LocalPort, tcpport)
        logger.info("starting server on 0.0.0.0:%s" % tcpport)
        return self.library.Srv_Start(self.pointer)
1328546
def DbPutServerInfo(self, argin):
        
        self._log.debug("In DbPutServerInfo()")

        if len(argin) < 4:
            self.warn_stream("DataBase::DbPutServerInfo(): insufficient number of arguments ")
            th_exc(DB_IncorrectArguments,
                   "insufficient server info",
                   "DataBase::DbPutServerInfo()")

        tmp_server = argin[0].lower()
        tmp_host = argin[1]
        tmp_mode = argin[2]
        tmp_level = argin[3]
        tmp_extra = []
        if len(argin) > 4:
            tmp_extra = argin[4:]

        tmp_len = len(argin) - 1
        self.db.put_server_info(tmp_server, tmp_host, tmp_mode, tmp_level, tmp_extra)
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)