3 ms·
I may just be confused, but couldn't you pass a pipe into the whole (server) process, instead of having it open its own sockets? (In https://github.com/jart/cos
by JoachimSchipper 3y ago
I may just be confused, but couldn't you pass a pipe into the whole (server) process, instead of having it open its own sockets? (In https://github.com/jart/cosmopolitan/blob/48b2afb192ec18eca40c0b25603c02a2e3b578e9/third_party/python/Modules/tokenbucket.c#L247 https://github.com/jart/cosmopolitan/blob/48b2afb192ec18eca4..., I gather?)
I haven't followed cosmopolitan / Linux pledge() too closely; but I notice your SERVER_PLEDGE and CLIENT_PLEDGE include stdio, so I expect you have write(2) (and could thus handle a pipe, and maybe even a passed-in AF_UNIX socket?)
Or is making the challenge more interesting - by actually including some networking - part of the fun?