@@ -65,18 +65,34 @@ the [examples](examples) to get started.
6565### Factory
6666
6767The ` Factory ` is responsible for creating your [ ` Client ` ] ( #client ) instance.
68- It also registers everything with the main [ ` EventLoop ` ] ( https://github.com/reactphp/event-loop#usage ) .
6968
7069``` php
71- $loop = \React\EventLoop\Factory::create();
72- $factory = new Factory($loop);
70+ $factory = new Clue\React\Quassel\Factory();
7371```
7472
75- If you need custom DNS, proxy or TLS settings, you can explicitly pass a
76- custom instance of the [ ` ConnectorInterface ` ] ( https://github.com/reactphp/socket#connectorinterface ) :
73+ This class takes an optional ` LoopInterface|null $loop ` parameter that can be used to
74+ pass the event loop instance to use for this object. You can use a ` null ` value
75+ here in order to use the [ default loop] ( https://github.com/reactphp/event-loop#loop ) .
76+ This value SHOULD NOT be given unless you're sure you want to explicitly use a
77+ given event loop instance.
78+
79+ If you need custom connector settings (DNS resolution, TLS parameters, timeouts,
80+ proxy servers etc.), you can explicitly pass a custom instance of the
81+ [ ` ConnectorInterface ` ] ( https://github.com/reactphp/socket#connectorinterface ) :
7782
7883``` php
79- $factory = new Factory($loop, $connector);
84+ $connector = new React\Socket\Connector(null, array(
85+ 'dns' => '127.0.0.1',
86+ 'tcp' => array(
87+ 'bindto' => '192.168.10.1:0'
88+ ),
89+ 'tls' => array(
90+ 'verify_peer' => false,
91+ 'verify_peer_name' => false
92+ )
93+ ));
94+
95+ $factory = new Clue\React\Quassel\Factory(null, $connector);
8096```
8197
8298#### createClient()
0 commit comments