3 ms·
This was very interesting to me - I was expecting using linux socket virtual FS paths to create the socket.
by drvdevd 5y ago
This was very interesting to me - I was expecting using linux socket virtual FS paths to create the socket.
- tyingq 5y agoPretty printed: https://gist.github.com/tyingq/4e568425e2e68e6390f3105e588787c6 https://gist.github.com/tyingq/4e568425e2e68e6390f3105e58878... The /inet/tcp/8080/0/0 is a gawk-ism, versus a Linux thing: https://www.gnu.org/software/gawk/manual/html_node/TCP_002fIP-Networking.html https://www.gnu.org/software/gawk/manual/html_node/TCP_002fI... Unfortunately, gawk doesn't let you control the listen/accept part of it, so it doesn't scale well. Not sure why they did it that way. A separate accept() call would have made it actually usable in a non-toy way.
- genewitch 5y agoProbably designed that way on purpose (or at least post hoc) so that a company wouldn't hit a wall with 10,000 users on the gawkttpd. This is how you get stuff like hiPHoP.