3 ms·
Using your language of choice: You open a socket on a port, listen for connections, when connection from client arrives read bytes from the socket, parse http r
by marktangotango 8y ago
Using your language of choice: You open a socket on a port, listen for connections, when connection from client arrives read bytes from the socket, parse http request from those bytes, do something that may yield bytes in response, write the response bytes to the socket, close the socket (optional).
https://beej.us/guide/bgnet/ https://beej.us/guide/bgnet/
- sureaboutthis 8y agoI asked about how to do this through apache or nginx. I know how to do it as you suggest.