src/ApiSettings.php
public static function createUrl(string $appId, string $cluster = null): string
    {
        $query = [
            'client' => 'api-clients/pusher (https://php-api-clients.org/clients/pusher)',
            'protocol' => 7,
            'version' => ApiSettings::getVersion(),
        ];

        $host = ($cluster !== null) ? "ws-{$cluster}.pusher.com" : 'ws.pusherapp.com';

        return 'wss://'.$host.'/app/' .
            $appId .
            '?' . http_build_query($query)
        ;
    }
public static function createUrl(string $appId, string $cluster = null): string
    {
        $query = [
            'client' => 'api-clients/pusher (https://php-api-clients.org/clients/pusher)',
            'protocol' => 7,
            'version' => ApiSettings::getVersion(),
        ];

        $host = ($cluster !== null) ? "ws-{$cluster}.pusher.com" : 'ws.pusherapp.com';

        return 'wss://'.$host.'/app/' .
            $appId .
            '?' . http_build_query($query)
        ;
    }
public static function createUrl ( string $ appId , string $ cluster = null ) : string { $ query = [ 'client' => 'api-clients/pusher (https://php-api-clients.org/clients/pusher)' , 'protocol' => 7 , 'version' => ApiSettings :: getVersion ( ) , ] ; $ host = ( $ cluster !== null ) ? "ws-{$cluster}.pusher.com" : 'ws.pusherapp.com' ; return 'wss://' . $ host . '/app/' . $ appId . '?' . http_build_query ( $ query ) ; }
Create WebSocket URL for given App ID.

@param  string $appId
@return string
Create WebSocket URL for given App ID .