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

Can not listen on all IPv4 and IPv6 interfaces #298

Closed
ilya-stromberg opened this issue Aug 26, 2013 · 1 comment
Closed

Can not listen on all IPv4 and IPv6 interfaces #298

ilya-stromberg opened this issue Aug 26, 2013 · 1 comment

Comments

@ilya-stromberg
Copy link
Contributor

I use vibe-d 0.7.16, OS is Linux Ubuntu 12.10 64bit, DMD 2.063.2.
Code is "Hello, World!" from this example:
https://github.com/rejectedsoftware/vibe.d/blob/master/examples/http_server/source/app.d

 import vibe.appmain;
 import vibe.http.server;

 void handleRequest(HTTPServerRequest req, HTTPServerResponse res)
 {
    res.writeBody(cast(ubyte[])"Hello, World!", "text/plain");
 }

 shared static this()
 {
    auto settings = new HTTPServerSettings;
    settings.port = 8080;

    listenHTTP(settings, &handleRequest);
 }

After run I have got the error:
Listening for HTTP requests on :::8080
Failed to listen on 0.0.0.0:8080

If I specify bind addresses

 settings.bindAddresses = ["0.0.0.0", "::"];

I have got the error:
Listening for HTTP requests on 0.0.0.0:8080
Failed to listen on :::8080

If I bind only IPv4 or IPv6 interfaces, its OK.

@mihails-strasuns
Copy link
Contributor

Duplicate for #249

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

No branches or pull requests

3 participants