----- Original Message -----
From: Glynn Clements <[EMAIL PROTECTED]>
To: Akshay Adhikari <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, April 13, 2000 9:19 PM
Subject: Re: TCP sockets full duplex?


>
> Akshay Adhikari wrote:
>
> > In what sense are TCP sockets full duplex? Sure, data can flow in each
> > direction independent of the other direction, but it wont work if this
> > happens at the same time.
> >
> > THat is, if a client and server process simultaneously send (thats
> > full-duplex) one window's worth of data on their connection, theyll
> > deadlock, each waiting for the other to acknowledge receipt, which is
not
> > going to happen.
>
> Sure it will.



What I should have said was - I have one client and one server, both send
MORE that a windows worth of data . Both do

for (i = 0 to 1000)
    send ();

and then for (i = 0 to 1000)
    recv ()

I sent 1000 packets of size 1400 bytes, and both programs crashed after abt
50 - 60 sends.
Thats the whole point of flow control, isnt it - neither process has dequed
received data (by issuing a recv), and so window size gradually goes to 0,
both processes wait for the other to open up its window which it wont do
because it hasnt done a recv () yet - that'l happen only after the 1000
sends are over. Ofcourse, if you use non-blocking sockets, the problem could
be avoided.....

Akshay


-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to