Dne st 30. 9. 2020 13:25 uživatel seany via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> napsal:

I am trying to use this example for a iot application:

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", ""];
         listenHTTP(settings, router);


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.