http - Implementing a WebServer -


i trying create web server of own , there several questions working of web servers using today. questions are:

  1. after receiving http request client through port 80, server respond using same port 80?
  2. if yes while sending large file pic in mb's, webserver unable receive requests other clients?
  3. is computer port duplex or simplex? (can send , receive @ same time)?
  4. if port on server side used send response client, (if tcp used, used), again 3-way handshaking done overhead...

http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html here guide on what's going on webservers, although it's in c concepts there. explain whole client server relationship implementation details.

i'll give high level on what's going on: happens when server gets new request comes in creates fork process it, way not bogged down each request, when request comes in child process handed new file write to(again implementation details).

so have 1 server waiting requests , each request received spawns child process deal request. i'm sure there easier languages implement stuff c(i had both c , java server serving either 1 in past) c gets understand things going on , i'm betting looking here

now there couple of things think about: how want webserver work. example explains parent child process. want use tcp/udp there differences in way payload gets delivered. don't have connect on port 80. that's default web.

hopefully guide you.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -