How webrick works


#1

Hi All,
I want to know what is the basic nature of a webrick.
Actually i create two instances of my application on my pc one on a
MOZILLA and second on a INTERNET EXPLORER.
on MOZILLA i uploaded 10 files and on INTERNET EXPLORER i upload only 1
file.
But it takes same time on both browser and page loading stop at the same
time.

i would like to know how webrick recognised who’s request.

Regards
Salil


#2

Salil G. wrote:

I want to know what is the basic nature of a webrick.
Actually i create two instances of my application on my pc one on a
MOZILLA and second on a INTERNET EXPLORER.
on MOZILLA i uploaded 10 files and on INTERNET EXPLORER i upload only 1
file.
But it takes same time on both browser and page loading stop at the same
time.

i would like to know how webrick recognised who’s request.

I suspect you are asking how TCP/IP works.

Roughly speaking…

host -> port -> sockets -> connections -> packets

…is the hierarchy of containers. The host is //localhost and the port
is
either :80 (invisible) or :3000 (explicit).

Webrick “listens” at a port until a client creates a socket and makes a
connection. The connection then persists, and another client can connect
at the
same port. (El Goog will lead you to many details of [socket listen]
here.)

A connection is like a virtual pair of wires. The server and client
communicate
by sending and recv’ing messages, and the connection protocol cuts these
up into
packets. Because Webrick only messes with one packet at a time (again,
roughly
speaking!), and because the connection layer stores the actual server
and client
information, Webrick can handle multiple browsers at the same time.


Phlip
http://flea.sourceforge.net/resume.html


#3

Salil G. wrote:

i would like to know how webrick recognised who’s request.

In general, servers listen for clients to connect over a specified
pathway. When a client connects, the server then creates a separate
unique pathway to communicate with the client, and then the server goes
back to listening for additional client connections. If several clients
connect at the same, then there will be several unique pathways that the
server establishes to speak to each client.