|
5 | 5 | use WebSocket\Client as WSClient; |
6 | 6 | use WebSocket\ConnectionException; |
7 | 7 |
|
8 | | -class BridgeConfig { |
9 | | - public string $url; |
10 | | - public string $secret; |
11 | | - public ?string $projectId; |
12 | | - public array $capabilities; |
13 | | - public int $heartbeatIntervalMs; |
14 | | - public int $heartbeatTimeoutMs; |
15 | | - public int $backoffInitialMs; |
16 | | - public int $backoffMaxMs; |
17 | | - public int $bufferLimit; |
18 | | - |
19 | | - public function __construct( |
20 | | - string $url, |
21 | | - string $secret, |
22 | | - ?string $projectId = null, |
23 | | - array $capabilities = ['console', 'error', 'navigation', 'network'], |
24 | | - int $heartbeatIntervalMs = 15000, |
25 | | - int $heartbeatTimeoutMs = 30000, |
26 | | - int $backoffInitialMs = 1000, |
27 | | - int $backoffMaxMs = 30000, |
28 | | - int $bufferLimit = 200 |
29 | | - ) { |
30 | | - $this->url = $url; |
31 | | - $this->secret = $secret; |
32 | | - $this->projectId = $projectId; |
33 | | - $this->capabilities = $capabilities; |
34 | | - $this->heartbeatIntervalMs = $heartbeatIntervalMs; |
35 | | - $this->heartbeatTimeoutMs = $heartbeatTimeoutMs; |
36 | | - $this->backoffInitialMs = $backoffInitialMs; |
37 | | - $this->backoffMaxMs = $backoffMaxMs; |
38 | | - $this->bufferLimit = $bufferLimit; |
39 | | - } |
40 | | -} |
41 | | - |
42 | 8 | class Client { |
43 | 9 | private ?WSClient $ws = null; |
44 | 10 | private BridgeConfig $config; |
|
0 commit comments