Access the TCP communication class to use (NIO, AIO, etc)

@return String
545313
public static String getCommClass(boolean asyncIOEnabled) {
        // Check to see if the TCP class has been changed from its default value.
        // If it hasn't and the native z/OS AIO support is ready and able then update the
        // class to use the native z/OS support.
        if ((commClass != null) && commClass.equals(commClassNio) && asyncIOEnabled) {
            commClass = commClassAio;
        }

        return commClass;
    }
964773
public function getConnectionTableName()
    {
        $type_names = [$this->getSourceTypeName(), $this->getTargetTypeName()];
        sort($type_names);

        return implode('_', $type_names);
    }
1094463
public function getConnectionAddress():string
    {
        $serviceList  = $this->getServiceList();
        if (App::hasBean('balancerSelector')) {
            $balancerType = $this->poolConfig->getBalancer();
            $balancer     = balancer()->select($balancerType);
            return $balancer->select($serviceList);
        }
        return current($serviceList);
    }
1163554
public function getHostAndPort(): string
    {
        if ($this->myPort !== $this->myScheme->getDefaultPort()) {
            return $this->myHost . ':' . $this->myPort;
        }

        return $this->myHost->__toString();
    }
741606
protected function getSocketStream()
    {
        if (!is_resource($this->socketResource)) {
            $this->connect();
            return $this->socketResource;
        }
        $meta = stream_get_meta_data($this->socketResource);
        if (($meta['timed_out'] || $meta['eof']))
            $this->connect();
        return $this->socketResource;
    }
100506
public function getIpV6() : ?string 
    {
        if ( ! $this->hasIpV6()) {
            $this->setIpV6($this->getDefaultIpV6());
        }
        return $this->ipV6;
    }
263077
public static function getTransportMethod()
    {
        $method = 'curl';
        if (!self::isCurlEnabled()) {
            $method = 'fopen';
            if (@ini_get('allow_url_fopen') != '1') {
                $method = 'socket';
                if (!self::isSocketEnabled()) {
                    return null;
                }
            }
        }
        return $method;
    }
522651
public function getConnectionString()
    {

        $settings = $this->connectionInfo;
        unset( $settings['search_path'] );

        foreach ($settings as $key => &$value) {
            $value = sprintf(
                "%s='%s'",
                $key,
                $value
            );
        }

        return implode(' ', $settings);

    }
1204945
public static function resolveConnection() 
    {
        $cls = get_called_class();
        $env = Connection::selectEnvironment();

        if (array_key_exists($cls, self::$_connections) 
            && array_key_exists($env, self::$_connections[$cls])
        ) {
                return self::$_connections[$cls][$env];
        }
        return self::$connection ? self::$connection : Connection::getConnection();
    }
32172
public static function getCurrentIP()
    {
        $ip = '';

        foreach (['HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR'] as $headerKey) {
            if ($item = getenv($headerKey)) {
                foreach (array_filter(explode(',', $item), 'trim') as $ipAddress) {
                    if ($ip = filter_var($ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
                        break 2;
                    }
                }
            }
        }

        return (string) $ip;
    }
1079302
public static function current()
    {
        $protocol = (!empty($_SERVER['HTTPS'])
            && $_SERVER['HTTPS'] !== 'off'
            || $_SERVER['SERVER_PORT'] === 443) ? 'https://' : 'http://';

        if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
            $host = $_SERVER['HTTP_X_FORWARDED_HOST'];
        } else {
            $host = $_SERVER['HTTP_HOST'];
        }

        return $protocol . $host . $_SERVER['REQUEST_URI'];
    }
518947
private function pingFsockopen() {
        $start = microtime(true);

        if (strtolower($this->typeCon) != 'tcp') {
            $this->setPort(7);
            $this->setHost("udp://$this->host");
        }

        // fsockopen prints a bunch of errors if a host is unreachable. Hide those
        // irrelevant errors and deal with the results instead.
        $fp = @fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout);
        if (!$fp) {
            $latency = false;
        } else {
            $latency = microtime(true) - $start;
            $latency = round($latency * 1000);
        }
        return $latency;
    }
1229915
public function getPort() : string
  {
      // Check for proxy first
      $port = self::server('HTTP_X_FORWARDED_PORT');
      if ($port) {
          return (string)$port;
      }

      $protocol = (string)self::server('HTTP_X_FORWARDED_PROTO');
      if ($protocol === 'https') {
          return '443';
      }

      return (string)self::server('SERVER_PORT');
  }
90060
public function getConnectionString()
    {

        $dsn = 'mysql:';

        // get the connection settings local so there is less function call overhead
        $connectionSettings = $this->getConnectionSettings();
        if ($this->isSocket()) {
            $dsn .= (string)'unix_socket=' . $connectionSettings->getHost() . ';';
        } else {
            $dsn .= (string)'host=' . $connectionSettings->getHost() . ';';
            if ($connectionSettings->getPort()) {
                $dsn .= 'port=' . $connectionSettings->getPort() . ';';
            }
        }

        if ($connectionSettings->getDatabase()) {
            $dsn .= "dbname=" . $connectionSettings->getDatabase() . ';';
        }

        if ($connectionSettings->getCharset()) {
            $dsn .= "charset=" . $connectionSettings->getCharset() . ';';
        }

        return $dsn;
    }
87751
public function scanPortRange() {
        if (strtolower($this->typePort) == 'tcp') {
            $hostIp = $this->hostIP;
        } else if (strtolower($this->typePort) == 'udp') {
            $hostIp = "udp://$this->hostIP";
        } else {
            throw new \Exception('Port Type undefined!');
        }

        $errno = $errstr = null;
        for ($portNumber = $this->startPort; $portNumber <= $this->endPort; $portNumber++) {
            $handle = @fsockopen($hostIp, $portNumber, $errno, $errstr, $this->timeout);
            if ($handle) {
                $service = $this->getService($portNumber, strtolower($this->typePort));
                $this->openPorts[$portNumber] = (!empty($service)) ? $service : null;
                fclose($handle);
            }
        }
        return $this->openPorts;
    }
1357183
public function getMemcached(){
		if(!is_object($this->memcached)){
			if(!class_exists('Memcached')){
				if(DEBUG_MODE){
					BLog::addToLog('Memcached class not found!',LL_ERROR);
					}
				return NULL;
				}
			if(DEBUG_MODE){
				BDebug::message('Memcached]: Connecting to memcached server...');
				}
			$this->memcached=new Memcached();
			$mc=$this->memcached;
			$mc->addServer("127.0.0.1",11211);
			$mc->setOption(Memcached::OPT_BINARY_PROTOCOL,true);
			$this->memcached_ver=$mc->getVersion();
			if(DEBUG_MODE){
				BDebug::message('[Memcached]: ver='.var_export($this->memcached_ver,true));
				}
			}
		return $this->memcached;
		}
117142
protected function channelName()
    {
        if (method_exists($this->notifiable, 'receivesBroadcastNotificationsOn')) {
            return $this->notifiable->receivesBroadcastNotificationsOn($this->notification);
        }

        $class = str_replace('\\', '.', get_class($this->notifiable));

        return $class.'.'.$this->notifiable->getKey();
    }