Skip to content

Commit 36a8b92

Browse files
authored
Merge pull request #17 from clue-labs/socket
Replace deprecated SocketClient with new Socket component
2 parents ecbef14 + 890afd7 commit 36a8b92

17 files changed

+35
-35
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# clue/connection-manager-extra [![Build Status](https://travis-ci.org/clue/php-connection-manager-extra.svg?branch=master)](https://travis-ci.org/clue/php-connection-manager-extra)
22

33
This project provides _extra_ (in terms of "additional", "extraordinary", "special" and "unusual") decorators,
4-
built on top of [ReactPHP's SocketClient](https://github.com/reactphp/socket-client).
4+
built on top of [ReactPHP's Socket](https://github.com/reactphp/socket).
55

66
**Table of Contents**
77

@@ -22,12 +22,12 @@ built on top of [ReactPHP's SocketClient](https://github.com/reactphp/socket-cli
2222

2323
## Introduction
2424

25-
If you're not already familar with [react/socket-client](https://github.com/reactphp/socket-client),
25+
If you're not already familar with [react/socket](https://github.com/reactphp/socket),
2626
think of it as an async (non-blocking) version of [`fsockopen()`](http://php.net/manual/en/function.fsockopen.php)
2727
or [`stream_socket_client()`](http://php.net/manual/en/function.stream-socket-client.php).
2828
I.e. before you can send and receive data to/from a remote server, you first have to establish a connection - which
2929
takes its time because it involves several steps.
30-
In order to be able to establish several connections at the same time, [react/socket-client](https://github.com/reactphp/socket-client) provides a simple
30+
In order to be able to establish several connections at the same time, [react/socket](https://github.com/reactphp/socket) provides a simple
3131
API to establish simple connections in an async (non-blocking) way.
3232

3333
This project includes several classes that extend this base functionality by implementing the same simple `ConnectorInterface`.
@@ -55,7 +55,7 @@ any combination thereof.
5555

5656
This section lists all this libraries' features along with some examples.
5757
The examples assume you've [installed](#install) this library and
58-
already [set up a `SocketClient/Connector` instance `$connector`](https://github.com/reactphp/socket-client#async-tcpip-connections).
58+
already [set up a `Socket/Connector` instance `$connector`](https://github.com/reactphp/socket#connector).
5959

6060
All classes are located in the `ConnectionManager\Extra` namespace.
6161

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "clue/connection-manager-extra",
3-
"description": "Extra decorators for creating async TCP/IP connections, built on top of ReactPHP's SocketClient",
4-
"keywords": ["SocketClient", "network", "connection", "timeout", "delay", "reject", "repeat", "retry", "random", "acl", "firewall", "ReactPHP"],
3+
"description": "Extra decorators for creating async TCP/IP connections, built on top of ReactPHP's Socket component",
4+
"keywords": ["Socket", "network", "connection", "timeout", "delay", "reject", "repeat", "retry", "random", "acl", "firewall", "ReactPHP"],
55
"homepage": "https://github.com/clue/php-connection-manager-extra",
66
"license": "MIT",
77
"authors": [
@@ -15,7 +15,7 @@
1515
},
1616
"require": {
1717
"php": ">=5.3",
18-
"react/socket-client": "^0.7 || ^0.6",
18+
"react/socket": "^0.7",
1919
"react/event-loop": "^0.4 || ^0.3",
2020
"react/promise": "^2.1 || ^1.2",
2121
"react/promise-timer": "^1.1"

src/ConnectionManagerDelay.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace ConnectionManager\Extra;
44

5-
use React\SocketClient\ConnectorInterface;
5+
use React\Socket\ConnectorInterface;
66
use React\EventLoop\LoopInterface;
77
use React\Promise\Timer;
88

src/ConnectionManagerReject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace ConnectionManager\Extra;
44

5-
use React\SocketClient\ConnectorInterface;
5+
use React\Socket\ConnectorInterface;
66
use React\Promise;
77
use Exception;
88

src/ConnectionManagerRepeat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace ConnectionManager\Extra;
44

5-
use React\SocketClient\ConnectorInterface;
5+
use React\Socket\ConnectorInterface;
66
use InvalidArgumentException;
77
use Exception;
88
use React\Promise\Promise;

src/ConnectionManagerSwappable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace ConnectionManager\Extra;
44

5-
use React\SocketClient\ConnectorInterface;
5+
use React\Socket\ConnectorInterface;
66

77
// connection manager decorator which simplifies exchanging the actual connection manager during runtime
88
class ConnectionManagerSwappable implements ConnectorInterface

src/ConnectionManagerTimeout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace ConnectionManager\Extra;
44

5-
use React\SocketClient\ConnectorInterface;
5+
use React\Socket\ConnectorInterface;
66
use React\EventLoop\LoopInterface;
77
use React\Promise\Timer;
88
use Exception;

src/Multiple/ConnectionManagerConsecutive.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace ConnectionManager\Extra\Multiple;
44

5-
use React\SocketClient\ConnectorInterface;
5+
use React\Socket\ConnectorInterface;
66
use React\Promise;
77
use UnderflowException;
88
use React\Promise\CancellablePromiseInterface;

src/Multiple/ConnectionManagerSelective.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace ConnectionManager\Extra\Multiple;
44

5-
use React\SocketClient\ConnectorInterface;
5+
use React\Socket\ConnectorInterface;
66
use React\Promise;
77
use UnderflowException;
88
use InvalidArgumentException;

tests/ConnectionManagerDelayTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function testDelayTenth()
2626

2727
public function testCancellationOfPromiseBeforeDelayDoesNotStartConnection()
2828
{
29-
$unused = $this->getMockBuilder('React\SocketClient\ConnectorInterface')->getMock();
29+
$unused = $this->getMockBuilder('React\Socket\ConnectorInterface')->getMock();
3030
$unused->expects($this->never())->method('connect');
3131

3232
$cm = new ConnectionManagerDelay($unused, 1.0, $this->loop);

0 commit comments

Comments
 (0)