vibe.de multiple ports.
Daniel Kozak
kozzi11 at gmail.com
Wed Sep 30 12:29:06 UTC 2020
Dne st 30. 9. 2020 13:25 uživatel seany via Digitalmars-d-learn <
digitalmars-d-learn at puremagic.com> napsal:
> Hello
>
> I am trying to use this example for a iot application:
> https://aberba.com/2018/using-vibe-d-web-interface/
>
> The code i use is:
>
> ushort port = 5504;
>
> void main(char[][] args)
> {
>
> auto router = new URLRouter;
> router.post("/archive", &savedata);
> router.get("/archive", &savedata);
>
> auto settings = new HTTPServerSettings;
> settings.port = port;
> settings.bindAddresses = ["::1", "0.0.0.0"];
> listenHTTP(settings, router);
>
> runApplication();
> }
>
>
> This is fine. But now that we have ~ 100 IoT devices in the
> field, I would like to assign each a new port.
>
Why? I do not see any reason for that.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20200930/0841ed46/attachment.htm>
More information about the Digitalmars-d-learn
mailing list