3 ms·
You are correct - you should never write your own web server. In this case, you're not writing your own web server. There is one provided with the standard libr
by eckyptang 14y ago
You are correct - you should never write your own web server. In this case, you're not writing your own web server. There is one provided with the standard library which will be embedded into your binary.
You are writing a bunch of handlers (as you would with Apache) and plugging them into the compiled in web server from the standard library.
For network servers, there is standard library support for SMTP, HTTP, normal stream based text protocols etc as well as serialization formatters and parsers for JSON, XML, HTML etc. You should never have to re-invent the wheel.