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

Add support for Unix domain sockets (UDS) #17

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
remove udg://
UDG sockets are based on datagrams instead of streams of bytes and already a part of React's datagram component.
  • Loading branch information
RafaelKa committed Jun 2, 2015
commit 0932e9b938b81cd67387a648d6225eba7f74fe27
8 changes: 3 additions & 5 deletions src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ public function listen($port, $host = '127.0.0.1')
} elseif (filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
// enclose IPv6 addresses in square brackets before appending port
$localSocket = 'tcp://[' . $host . ']:' . $port;
} elseif (preg_match('#^(unix|udg)://#', $host)) {
} elseif (preg_match('#^unix://#', $host)) {
$localSocket = $host;
}

if (empty($localSocket)) {
} else {
throw new \UnexpectedValueException(
'"' . $host . '" does not match to a set of supported transports. ' .
'Supported transports are: IPv4, IPv6, unix:// and udg:// .'
'Supported transports are: IPv4, IPv6 and unix:// .'
, 1433253311);
}

Expand Down