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

Server::listen() is blocking if given a hostname #7

Closed
clue opened this issue Jun 14, 2014 · 1 comment · Fixed by #66
Closed

Server::listen() is blocking if given a hostname #7

clue opened this issue Jun 14, 2014 · 1 comment · Fixed by #66

Comments

@clue
Copy link
Member

clue commented Jun 14, 2014

Migrated from reactphp/reactphp#181, originally reported 2013-04-13

Calling Socket\Server::listen($port, $host) with a hostname instead of an IPv4 address is a blocking operation.

Example:

$server = new Socket\Server($loop);
$server->listen(1234, 'example.com');

Giving a hostname will result in resolving it via DNS (blocking).

@attozk
Copy link

attozk commented Oct 27, 2014

I think listen shouldn't rely on hostnames.

As an example Apache's listen works only on IP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants