[Nel] NeL Network Engine

Nicolas Hognon cblt@cblt.org
Thu, 22 Feb 2001 23:12:39 +0100


> (A) If no buffer space is available within the transport system to hold
> the data to be transmitted, the actual sending will block. Has anybody
> come across this case ? When does this happen in practice ?

i'm not sure that i understand this part of your mail and i hope you'll
understand my answer because i'm not sure my english enough fluent :))

you're asking want happened if you call send or write on a socket
and there is not enough space in the tcp stack / transport layer buffer.
it depends you've got blocking or non blocking socket.
if it's a blocking socket you're thread will be blocked
until you're data can be send by the tcp stack.
if you're socket is in non blocking mode send/write
will return you an error an errno will be EWOULDBLOCK
or WSAEWOULDBLOCK under winsock.

but i'm not sure it's the answer to your question
because it is not a very huge problem.
i make the same mistake because when you make
some little test it's more common that receive failed
with a wouldblock than send. when i began
writting our network api (for the company i work)
i made this mistake. but when i made
some test with huge network messages and a poor modem
i encounter tihs problem.

i hope this help you
but can you answer me that i know if i understand
your problem :))


-- 
Nicolas Hognon
home : cblt@cblt.org         / www.cblt.org
work : nicolash@virtools.com / www.virtools.com
#ICQ : 36044443
    
Enjoy the silence
(DM)