About network programming using select..

T

Thr

Hi,

I read some books about network programming..
Still, I have some questions:

1. let's assume that we have http server written using nonblocking i/o
and select().
How is it possible to server many requests simultaneously?

I mean - we have, for example, static binary file that is 700 MB long
(and many other, much smaller files, that are, for example, html
webpages)
..
Let's assume that server found new socket descriptor with select(), and
accepted it..
after receiving data from client, and after parsing request header we
found that he want this big file, and we started to send him chunks of
data..

I think that this situation should block sending data for other
clients, does it (until this 700 MB file is send) ?

If not, how is it possible to serve simultaneously many connections ?

"Binding" file descriptor with open file to accepted socket descriptor
with struct{} and queuing some chunks of data with fifo, and then -
iterating to the next socket descriptor returned by select()?
 
B

Barry Schwarz

Hi,

I read some books about network programming..
Still, I have some questions:

1. let's assume that we have http server written using nonblocking i/o
and select().
How is it possible to server many requests simultaneously?

This and the other questions in your post are not related to the C
language. They are issues related to your system and any extensions
it may provide. You will have more luck asking in a newsgroup where
those issues are topical.


Remove del for email
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,139
Messages
2,570,806
Members
47,353
Latest member
TamiPutnam

Latest Threads

Top