1 | <?php |
||
9 | class NetworkAddressTimestamp extends NetworkAddress |
||
10 | { |
||
11 | /** |
||
12 | * @var int|string |
||
13 | */ |
||
14 | private $time; |
||
15 | |||
16 | /** |
||
17 | * @param int $time |
||
18 | * @param int $services |
||
19 | * @param IpInterface $ip |
||
20 | * @param int|string $port |
||
21 | */ |
||
22 | 14 | public function __construct($time, $services, IpInterface $ip, $port) |
|
27 | |||
28 | /** |
||
29 | * @return int|string |
||
30 | */ |
||
31 | 6 | public function getTimestamp() |
|
35 | |||
36 | /** |
||
37 | * @return NetworkAddress |
||
38 | */ |
||
39 | public function withoutTimestamp() |
||
40 | { |
||
41 | return new NetworkAddress( |
||
42 | $this->getServices(), |
||
43 | $this->getIp(), |
||
44 | $this->getPort() |
||
45 | ); |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @return BufferInterface |
||
50 | */ |
||
51 | 3 | public function getBuffer() |
|
55 | } |
||
56 |