Re: Full sample for select()
- From: Andrei Voropaev <avorop@xxxxxxx>
- Date: Fri, 31 Mar 2006 09:36:10 +0000 (UTC)
On 2006-03-30, Alex Vinokur <alexvn@xxxxxxxxxxxxxxxxxxxxx> wrote:
num = select (nfds, 0, writefds, 0, 0);
if (num > 0) { // Do something }
It seems that the piece above works as
while (1) { // Do something }
If it is truth what do we reach here?
So, I guess you've never done networking programming with TCP sockets.
If you did, then your programs are broken, because if your peer for
whatever reason stops reading from the socket while your are actively
writing at your end, then after filling up your TCP buffers you won't be
able to write anything else and your program will either block, or won't
notice the problem. Even simple network congestion may result in zero
data transfer rate and your buffers will fill up.
--
Minds, like parachutes, function best when open
.
- Follow-Ups:
- Re: Full sample for select()
- From: Alex Vinokur
- Re: Full sample for select()
- References:
- Full sample for select()
- From: Alex Vinokur
- Re: Full sample for select()
- From: Mark
- Re: Full sample for select()
- From: Andrei Voropaev
- Re: Full sample for select()
- From: Alex Vinokur
- Full sample for select()
- Prev by Date: Re: how to check for completion of all threads when mutiple threads are running
- Next by Date: pipe intra-process
- Previous by thread: Re: Full sample for select()
- Next by thread: Re: Full sample for select()
- Index(es):
Relevant Pages
|