1 | <?php |
||
11 | class Connector |
||
12 | { |
||
13 | /** |
||
14 | * @var ConnectionParams |
||
15 | */ |
||
16 | private $params; |
||
17 | |||
18 | /** |
||
19 | * @var MsgFactory |
||
20 | */ |
||
21 | private $msgs; |
||
22 | |||
23 | /** |
||
24 | * @var LoopInterface |
||
25 | */ |
||
26 | private $eventLoop; |
||
27 | |||
28 | /** |
||
29 | * @var \React\Socket\Connector |
||
30 | */ |
||
31 | private $socketConnector; |
||
32 | |||
33 | /** |
||
34 | * Connector constructor. |
||
35 | * @param MsgFactory $msgs |
||
36 | * @param ConnectionParams $params |
||
37 | * @param LoopInterface $loop |
||
38 | * @param array $settings |
||
39 | */ |
||
40 | 12 | public function __construct(MsgFactory $msgs, ConnectionParams $params, LoopInterface $loop, array $settings) |
|
47 | |||
48 | /** |
||
49 | * @param NetworkAddressInterface $remotePeer |
||
50 | * @return \React\Promise\PromiseInterface |
||
51 | */ |
||
52 | 12 | public function rawConnect(NetworkAddressInterface $remotePeer) |
|
62 | |||
63 | /** |
||
64 | * @param NetworkAddressInterface $remotePeer |
||
65 | * @return \React\Promise\PromiseInterface |
||
66 | */ |
||
67 | 12 | public function connect(NetworkAddressInterface $remotePeer) |
|
84 | } |
||
85 |