1 | <?php |
||
7 | class ServerConfig |
||
8 | { |
||
9 | |||
10 | private $clientsPerFork = WebSocketServerContract::CLIENTS_PER_FORK; |
||
11 | private $streamSelectTimeout = WebSocketServerContract::STREAM_SELECT_TIMEOUT; |
||
12 | |||
13 | private $host = WebSocketServerContract::DEFAULT_HOST; |
||
14 | private $port = WebSocketServerContract::DEFAULT_PORT; |
||
15 | |||
16 | private $isForking = true; |
||
17 | |||
18 | /** |
||
19 | * @return mixed |
||
20 | */ |
||
21 | public function getClientsPerFork(): int |
||
25 | |||
26 | /** |
||
27 | * @param mixed $clientsPerFork |
||
28 | */ |
||
29 | public function setClientsPerFork(int $clientsPerFork) |
||
33 | |||
34 | /** |
||
35 | * @return mixed |
||
36 | */ |
||
37 | public function getStreamSelectTimeout(): int |
||
41 | |||
42 | /** |
||
43 | * @param mixed $streamSelectTimeout |
||
44 | */ |
||
45 | public function setStreamSelectTimeout(int $streamSelectTimeout) |
||
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | public function getHost(): string |
||
57 | |||
58 | /** |
||
59 | * @param string $host |
||
60 | */ |
||
61 | public function setHost(string $host) |
||
65 | |||
66 | /** |
||
67 | * @return int |
||
68 | */ |
||
69 | public function getPort(): int |
||
73 | |||
74 | /** |
||
75 | * @param int $port |
||
76 | */ |
||
77 | public function setPort(int $port) |
||
81 | |||
82 | /** |
||
83 | * @return bool |
||
84 | */ |
||
85 | public function isForking(): bool |
||
89 | |||
90 | /** |
||
91 | * @param bool $isForking |
||
92 | */ |
||
93 | public function setForking(bool $isForking) |
||
97 | } |