Client proxy settings #57
-
Hi!
But i cant find such functions when i try to use project. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, sure u can do this just like in code snippet from readme <?php
use WSSC\WebSocketClient;
use WSSC\Components\ClientConfig;
$config = new ClientConfig();
$config->setFragmentSize(8096);
$config->setTimeout(15);
$config->setHeaders([
'X-Custom-Header' => 'Foo Bar Baz',
]);
// if proxy settings is of need
$config->setProxy('127.0.0.1', '80');
$config->setProxyAuth('proxyUser', 'proxyPass');
$client = new WebSocketClient('ws://localhost:8000/notifications/messanger/yourtoken123', $config); the only thing u need to do so, is by passing |
Beta Was this translation helpful? Give feedback.
-
You can see the logic op changing flow in php-wss/src/Components/WscMain.php Line 95 in 6d3dc0f And if proxy set correctly will call this function respectfully: php-wss/src/Components/WscMain.php Line 158 in 6d3dc0f |
Beta Was this translation helpful? Give feedback.
Hi, sure u can do this just like in code snippet from readme
the only thing u need to do so, is by passing
$config
variable toWebSocketClient
class