protected function getPort($scheme)
    {
        if ($scheme == self::SCHEME_WEBSOCKET) {
            return 80;
        } elseif ($scheme == self::SCHEME_WEBSOCKET_SECURE) {
            return 443;
        } elseif ($scheme == self::SCHEME_UNDERLYING) {
            return 80;
        } elseif ($scheme == self::SCHEME_UNDERLYING_SECURE) {
            return 443;
        } else {
            throw new InvalidArgumentException('Unknown websocket scheme');
        }
    }
protected function getPort($scheme)
    {
        if ($scheme == self::SCHEME_WEBSOCKET) {
            return 80;
        } elseif ($scheme == self::SCHEME_WEBSOCKET_SECURE) {
            return 443;
        } elseif ($scheme == self::SCHEME_UNDERLYING) {
            return 80;
        } elseif ($scheme == self::SCHEME_UNDERLYING_SECURE) {
            return 443;
        } else {
            throw new InvalidArgumentException('Unknown websocket scheme');
        }
    }
protected function getPort ( $ scheme ) { if ( $ scheme == self :: SCHEME_WEBSOCKET ) { return 80 ; } elseif ( $ scheme == self :: SCHEME_WEBSOCKET_SECURE ) { return 443 ; } elseif ( $ scheme == self :: SCHEME_UNDERLYING ) { return 80 ; } elseif ( $ scheme == self :: SCHEME_UNDERLYING_SECURE ) { return 443 ; } else { throw new InvalidArgumentException ( 'Unknown websocket scheme' ) ; } }
Gets the default port for a scheme
By default, the WebSocket Protocol uses port 80 for regular WebSocket
connections and port 443 for WebSocket connections tunneled over
Transport Layer Security

@param string|false $scheme
@return int
Gets the default port for a scheme By default the WebSocket Protocol uses port 80 for regular WebSocket connections and port 443 for WebSocket connections tunneled over Transport Layer Security