Gets server.

@return server, ${serverScheme}://${serverHost}:${serverPort}
1047
public static String getServer() {
        final StringBuilder serverBuilder = new StringBuilder(getServerScheme()).append("://").append(getServerHost());
        final String port = getServerPort();
        if (StringUtils.isNotBlank(port) && !"80".equals(port) && !"443".equals(port)) {
            serverBuilder.append(':').append(port);
        }

        return serverBuilder.toString();
    }
258902
public static Server getServer(final Object instance, final String bindAddress, final int port, Configuration conf) 
    throws IOException {
    return getServer(instance, bindAddress, port, 1, false, conf);
  }
481190
public function getPort()
    {
        if ($this->_port === null) {
            $this->_port = !$this->getIsSecureConnection() && isset($this->swooleRequest->server['SERVER_PORT']) ? (int) $this->swooleRequest->server['SERVER_PORT'] : 80;
        }

        return $this->_port;
    }
532220
public int getServerPort()
  {
    String host = null;

    CharSequence rawHost;
    if ((rawHost = getHost()) != null) {
      int length = rawHost.length();
      int i;

      for (i = length - 1; i >= 0; i--) {
        if (rawHost.charAt(i) == ':') {
          int port = 0;

          for (i++; i < length; i++) {
            char ch = rawHost.charAt(i);

            if ('0' <= ch && ch <= '9') {
              port = 10 * port + ch - '0';
            }
          }

          return port;
        }
      }

      // server/0521 vs server/052o
      // because of proxies, need to use the host header,
      // not the actual port
      return isSecure() ? 443 : 80;
    }

    if (host == null) {
      return connTcp().portLocal();
    }

    int p1 = host.lastIndexOf(':');

    if (p1 < 0)
      return isSecure() ? 443 : 80;
    else {
      int length = host.length();
      int port = 0;

      for (int i = p1 + 1; i < length; i++) {
        char ch = host.charAt(i);

        if ('0' <= ch && ch <= '9') {
          port = 10 * port + ch - '0';
        }
      }

      return port;
    }
  }
981043
public function getHostWithPort()
    {
        if ($this->hasPort() && (!$this->hasDefaultPort() || !$this->isPortDefault())) {
            return $this->getHost() . ':' . $this->getPort();
        } else {
            return $this->getHost();
        }
    }
42744
public function getHost()
    {
        $hostClass = $this->hostClass;
        $user = $hostClass::buildNoInitModel();
        /* @var BaseUserModel $user */
        return $this->hasOne($hostClass::className(), [$user->guidAttribute => 'createdBy']);
    }
800514
public int getPort() {
    final Connector[] connectors = this.server.getConnectors();
    checkState(connectors.length >= 1, "Server must have at least 1 connector");

    // The first connector is created upon initializing the server. That's the one that has the port.
    return connectors[0].getLocalPort();
  }
1106424
public function getServerParams()
    {
        if ($this->serverParams === null) {
            if ($this->serverParamsProvider !== null) {
                $this->serverParams = ($this->serverParamsProvider)();
            } else {
                $this->serverParams = [];
            }
        }
        return $this->serverParams;
    }
1198839
public static function getHost()
    {
        $host = '';
        if (isset($_SERVER['HTTP_X_FORWARDED_HOST']) && $host = $_SERVER['HTTP_X_FORWARDED_HOST']) {
            $elements = explode(',', $host);
            $host     = trim(end($elements));
        } else {
            if (isset($_SERVER['HTTP_HOST']) && !$host = $_SERVER['HTTP_HOST']) {
                if (isset($_SERVER['SERVER_NAME']) && !$host = $_SERVER['SERVER_NAME']) {
                    $host = !empty($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : '';
                }
            }
        }
        // Remove port number from host
        $host = preg_replace('/:\d+$/', '', $host);

        return trim($host);
    }
120256
private function getFromRemoteHostServer()
    {
        if (empty($remoteHost = $this->request->server('REMOTE_HOST')))
            return null;

        $remoteHost = explode('.', $remoteHost);
        $locale     = strtolower(end($remoteHost));

        return $this->isSupported($locale) ? $locale : null;
    }
309162
def server(self):
        
        server = getattr(self, "_server", None)
        if server is None:
            server = WSGIServer(('', self.port), self._handle, log=None)
            self._server = server
        return server
232817
public function getServer($key = null)
    {
        if ($key === null) {
            return $this->server;
        } else {
            return (isset($this->server[$key])) ? $this->server[$key] : null;
        }
    }
184368
public function getHost()
    {
        if (isset($this->env['HOST'])) {
            if (strpos($this->env['HOST'], ':') !== false) {
                $hostParts = explode(':', $this->env['HOST']);

                return $hostParts[0];
            }

            return $this->env['HOST'];
        } else {
            return $this->env['SERVER_NAME'];
        }
    }
1325261
def server(self):
        """"""

        conn = self.connection_class(self)
        with self.mutex:
            self.connections.append(conn)
        return conn
1142499
public function getHost() : ?string 
    {
        if ( ! $this->hasHost()) {
            $this->setHost($this->getDefaultHost());
        }
        return $this->host;
    }
1205703
function() {
  var server = this.get("server");
  if (!server)
    return null;
  var address = server.address();
  var scheme = server instanceof https.Server ? 'https' : 'http';
  return util.format("%s://%s:%d", scheme, address.address, address.port);
}
1030812
public function getUserHost()
    {
        if (isset($this->_userHost)) {
            return $this->_userHost;
        }
        return $this->_userHost = isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : null;
    }