By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,959 Members | 1,139 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,959 IT Pros & Developers. It's quick & easy.

About network programming using select..

P: n/a
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()?

--
THR

Sep 17 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 17 Sep 2006 17:10:24 -0700, "Thr" <da******@gmail.comwrote:
>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
Sep 18 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.