Completed
Push — master ( df021a...516ea9 )
by Arthur
01:34
created

ServerConfig::getStreamSelectTimeout()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace WSSC\Components;
4
5
use WSSC\Contracts\WebSocketServerContract;
6
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
    /**
17
     * @return mixed
18
     */
19
    public function getClientsPerFork(): int
20
    {
21
        return $this->clientsPerFork;
22
    }
23
24
    /**
25
     * @param mixed $clientsPerFork
26
     */
27
    public function setClientsPerFork(int $clientsPerFork)
28
    {
29
        $this->clientsPerFork = $clientsPerFork;
30
    }
31
32
    /**
33
     * @return mixed
34
     */
35
    public function getStreamSelectTimeout(): int
36
    {
37
        return $this->streamSelectTimeout;
38
    }
39
40
    /**
41
     * @param mixed $streamSelectTimeout
42
     */
43
    public function setStreamSelectTimeout(int $streamSelectTimeout)
44
    {
45
        $this->streamSelectTimeout = $streamSelectTimeout;
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getHost(): string
52
    {
53
        return $this->host;
54
    }
55
56
    /**
57
     * @param string $host
58
     */
59
    public function setHost(string $host)
60
    {
61
        $this->host = $host;
62
    }
63
64
    /**
65
     * @return int
66
     */
67
    public function getPort(): int
68
    {
69
        return $this->port;
70
    }
71
72
    /**
73
     * @param int $port
74
     */
75
    public function setPort(int $port)
76
    {
77
        $this->port = $port;
78
    }
79
}