diff --git a/README.md b/README.md index 389b670..fffeb85 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ mess with most of the low-level details. * [Advanced](#advanced) * [Sender](#sender) * [SOCKS proxy](#socks-proxy) - * [Unix domain sockets](#unix-domain-sockets) * [Options](#options) * [Install](#install) * [Tests](#tests) @@ -487,22 +486,6 @@ This works for both plain HTTP and SSL encrypted HTTPS requests. See also the [SOCKS example](examples/11-socks-proxy.php). -### Unix domain sockets - -This library also supports connecting to a local Unix domain socket (UDS) path. -You have to explicitly create a legacy [`Sender`](#sender) that passes every -request through the given UNIX domain socket. -For consistency reasons you still have to pass full HTTP URLs for every request, -but the host and port will be ignored when establishing a connection. - -```php -$path = 'unix:///tmp/daemon.sock'; -$sender = Sender::createFromLoopUnix($loop, $path); -$client = new Browser($loop, $sender); - -$client->get('http://localhost/demo'); -``` - ### Options Note: This API is subject to change. diff --git a/src/Io/FixedUriConnector.php b/src/Io/FixedUriConnector.php deleted file mode 100644 index 0b4777b..0000000 --- a/src/Io/FixedUriConnector.php +++ /dev/null @@ -1,23 +0,0 @@ -uri = $uri; - $this->connector = $connector; - } - - public function connect($_) - { - return $this->connector->connect($this->uri); - } -} diff --git a/src/Io/Sender.php b/src/Io/Sender.php index 9729dfb..7ed8b00 100644 --- a/src/Io/Sender.php +++ b/src/Io/Sender.php @@ -13,7 +13,6 @@ use React\Promise\Deferred; use React\Socket\Connector; use React\Socket\ConnectorInterface; -use React\Socket\UnixConnector; use React\Stream\ReadableStreamInterface; /** @@ -61,24 +60,6 @@ public static function createFromLoopDns(LoopInterface $loop, $dns) ))); } - /** - * create a sender that sends *everything* through given UNIX socket path - * - * @param LoopInterface $loop - * @param string $path - * @return self - */ - public static function createFromLoopUnix(LoopInterface $loop, $path) - { - return self::createFromLoop( - $loop, - new FixedUriConnector( - $path, - new UnixConnector($loop) - ) - ); - } - private $http; /** diff --git a/tests/Io/FixedUriConnectorTest.php b/tests/Io/FixedUriConnectorTest.php deleted file mode 100644 index 02f2668..0000000 --- a/tests/Io/FixedUriConnectorTest.php +++ /dev/null @@ -1,16 +0,0 @@ -getMockBuilder('React\Socket\ConnectorInterface')->getMock(); - $base->expects($this->once())->method('connect')->with('test')->willReturn('ret'); - - $connector = new FixedUriConnector('test', $base); - - $this->assertEquals('ret', $connector->connect('ignored')); - } -} diff --git a/tests/Io/SenderTest.php b/tests/Io/SenderTest.php index c352ac8..00f8f1c 100644 --- a/tests/Io/SenderTest.php +++ b/tests/Io/SenderTest.php @@ -23,13 +23,6 @@ public function testCreateFromLoop() $this->assertInstanceOf('Clue\React\Buzz\Io\Sender', $sender); } - public function testCreateFromLoopUnix() - { - $sender = Sender::createFromLoopUnix($this->loop, 'unix:///run/daemon.sock'); - - $this->assertInstanceOf('Clue\React\Buzz\Io\Sender', $sender); - } - public function testSenderConnectorRejection() { $connector = $this->getMock('React\Socket\ConnectorInterface');