Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Nov 2006 14:38:57 -0800
From:      Garrett Cooper <youshi10@u.washington.edu>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Single UDP sockets : duplex capable?
Message-ID:  <456CBA81.5040302@u.washington.edu>
In-Reply-To: <9ab217670611281324y7e6b9d69g7f8843504b2fbd8d@mail.gmail.com>
References:  <456CA68E.7090207@u.washington.edu> <9ab217670611281324y7e6b9d69g7f8843504b2fbd8d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Devon H. O'Dell wrote:
> 2006/11/28, Garrett Cooper <youshi10@u.washington.edu>:
>> Hello,
>>
>>     Just wondering, abstractly..
>
> Both sides can read from and write to the socket file descriptor.
> You'll need to develop a protocol to determine when either given side
> is expecting to receive or to send data (if both sides sit around in
> read(2), you're not going to get much done) :)
>
> --dho
>
>>  -------------------------
>> | A -[socket (UDP)]-> B |
>>  -------------------------
>>
>>     A creates a UDP socket (call it 's1') to talk to B.
>>
>>     Can B use the same socket ('s2') to talk to A using read(2) or
>> recv(2), or does A have to accept(2) traffic from B using a different
>> socket?
>>
>>     The programming language I'm using is C (not C++).
>>
>> Thanks,
>> -Garrett
Ok. While my intuition of networking hinted that, I didn't want to make 
an assumption and bite myself in the ass, so as to speak.
Thank you very much again for the clarification!
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?456CBA81.5040302>