1 | <?php |
||
13 | class PortConnection extends \React\Socket\Connection implements PortConnectionInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var boolean Whether this is an incoming connection. |
||
17 | */ |
||
18 | protected $incoming; |
||
19 | |||
20 | 3 | public function __construct($stream, LoopInterface $loop, $incoming = false) |
|
25 | |||
26 | |||
27 | /** |
||
28 | * @return int The remote port for this connection. |
||
29 | */ |
||
30 | public function getRemotePort() |
||
34 | |||
35 | /** |
||
36 | * @return int The target port for this connection. |
||
37 | */ |
||
38 | 1 | public function getTargetPort() |
|
42 | |||
43 | /** |
||
44 | * @return string The target address for this connection. |
||
45 | */ |
||
46 | public function getTargetAddress() |
||
50 | |||
51 | /** |
||
52 | * @param $address |
||
53 | * @return string |
||
54 | * @todo Make parent function protected. |
||
55 | */ |
||
56 | protected function parseAddress($address) |
||
60 | |||
61 | protected function parsePort($address) |
||
66 | |||
67 | /** |
||
68 | * @return int The source port for this connection. |
||
69 | */ |
||
70 | 1 | public function getSourcePort() |
|
74 | |||
75 | /** |
||
76 | * @return string The source address for this connection. This is the same as the remote address if this connection is incoming. |
||
77 | */ |
||
78 | 1 | public function getSourceAddress() |
|
82 | } |