4 ms·
while it’s a good idea to understand how to use TCP socket directly. Trying to reinvent http request parsing is a waste of time. You could do something simpler
by skyde 5y ago
while it’s a good idea to understand how to use TCP socket directly. Trying to reinvent http request parsing is a waste of time.
You could do something simpler maybe.
one thing i noticed from your code is it can only process one request at any given time.
A real server would start a thread for each connexion.
- trevcanhuman 5y agoYep, I’ve read a little here and there on multi threading but haven’t actually tried it out. I’ll look more into it later in the day. I’ll definitely try it out using some http library and see if that works with the url shortening and all.