Dagob
Dagob

Reputation: 745

How to handle HTTP requests

When a browser requests a web page, the browser will send a lot of requests. How do you need to handle these requests? Can I accept all those pages multi-threaded and send the result back (With send locking), or do I need to accept only 1 packet and send the result, accept another packet and send the result?

Upvotes: 0

Views: 4381

Answers (1)

paulsm4
paulsm4

Reputation: 121869

I'd suggest brushing up on some of the basics of TCP/IP networking, sockets programming and the HTTP protocol before you go too much further.

SUGGESTIONS:

1) Check out Beej's Guide to Network Programming

2) Here are a few links on HTTP and how it works:

3) First, I would definitely get a copy of Wireshark and trace a couple of simple HTTP requests and responses between your browser and some server:

IMHO...

Upvotes: 2

Related Questions