8000 Merge pull request #115 from SimonFrings/socket · SimonFrings/reactphp-redis@408a248 · GitHub
[go: up one dir, main page]

Skip to content

Commit 408a248

Browse files
authored
Merge pull request clue#115 from SimonFrings/socket
Simplify usage by supporting new Socket API
2 parents d3e55bc + 7fc6054 commit 408a248

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,12 @@ here in order to use the [default loop](https://github.com/reactphp/event-loop#l
9797
This value SHOULD NOT be given unless you're sure you want to explicitly use a
9898
given event loop instance.
9999

100-
If you need custom DNS, proxy or TLS settings, you can explicitly pass a
101-
custom instance of the [`ConnectorInterface`](https://github.com/reactphp/socket#connectorinterface):
100+
If you need custom connector settings (DNS resolution, TLS parameters, timeouts,
101+
proxy servers etc.), you can explicitly pass a custom instance of the
102+
[`ConnectorInterface`](https://github.com/reactphp/socket#connectorinterface):
102103

103104
```php
104-
$connector = new React\Socket\Connector(null, array(
105+
$connector = new React\Socket\Connector(array(
105106
'dns' => '127.0.0.1',
106107
'tcp' => array(
107108
'bindto' => '192.168.10.1:0'

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"react/event-loop": "^1.2",
1818
"react/promise": "^2.0 || ^1.1",
1919
"react/promise-timer": "^1.5",
20-
"react/socket": "^1.8"
20+
"react/socket": "^1.9"
2121
},
2222
"require-dev": {
2323
"clue/block-react": "^1.1",

src/Factory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Factory
3131
public function __construct(LoopInterface $loop = null, ConnectorInterface $connector = null, ProtocolFactory $protocol = null)
3232
{
3333
$this->loop = $loop ?: Loop::get();
34-
$this->connector = $connector ?: new Connector($this->loop);
34+
$this->connector = $connector ?: new Connector(array(), $this->loop);
3535
$this->protocol = $protocol ?: new ProtocolFactory();
3636
}
3737

0 commit comments

Comments
 (0)
0