Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for Unix domain sockets (UDS) for now #81

Merged
merged 1 commit into from
Sep 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down
23 changes: 0 additions & 23 deletions src/Io/FixedUriConnector.php

This file was deleted.

19 changes: 0 additions & 19 deletions src/Io/Sender.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use React\Promise\Deferred;
use React\Socket\Connector;
use React\Socket\ConnectorInterface;
use React\Socket\UnixConnector;
use React\Stream\ReadableStreamInterface;

/**
Expand Down Expand Up @@ -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;

/**
Expand Down
16 changes: 0 additions & 16 deletions tests/Io/FixedUriConnectorTest.php

This file was deleted.

7 changes: 0 additions & 7 deletions tests/Io/SenderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down