diff --git a/README.md b/README.md index 0cc11c8..07fb1a3 100644 --- a/README.md +++ b/README.md @@ -97,11 +97,12 @@ here in order to use the [default loop](https://github.com/reactphp/event-loop#l This value SHOULD NOT be given unless you're sure you want to explicitly use a given event loop instance. -If you need custom DNS, proxy or TLS settings, you can explicitly pass a -custom instance of the [`ConnectorInterface`](https://github.com/reactphp/socket#connectorinterface): +If you need custom connector settings (DNS resolution, TLS parameters, timeouts, +proxy servers etc.), you can explicitly pass a custom instance of the +[`ConnectorInterface`](https://github.com/reactphp/socket#connectorinterface): ```php -$connector = new React\Socket\Connector(null, array( +$connector = new React\Socket\Connector(array( 'dns' => '127.0.0.1', 'tcp' => array( 'bindto' => '192.168.10.1:0' diff --git a/composer.json b/composer.json index 8f4dde6..3f8c7af 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "react/event-loop": "^1.2", "react/promise": "^2.0 || ^1.1", "react/promise-timer": "^1.5", - "react/socket": "^1.8" + "react/socket": "^1.9" }, "require-dev": { "clue/block-react": "^1.1", diff --git a/src/Factory.php b/src/Factory.php index aec03da..90706d3 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -31,7 +31,7 @@ class Factory public function __construct(LoopInterface $loop = null, ConnectorInterface $connector = null, ProtocolFactory $protocol = null) { $this->loop = $loop ?: Loop::get(); - $this->connector = $connector ?: new Connector($this->loop); + $this->connector = $connector ?: new Connector(array(), $this->loop); $this->protocol = $protocol ?: new ProtocolFactory(); }