From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 28 22:38:44 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B283916A412 for ; Tue, 28 Nov 2006 22:38:44 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout3.cac.washington.edu (mxout3.cac.washington.edu [140.142.32.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08C6443CB6 for ; Tue, 28 Nov 2006 22:38:31 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout3.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kASMcala012254 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 28 Nov 2006 14:38:36 -0800 X-Auth-Received: from [128.208.5.99] (nilakantha.cs.washington.edu [128.208.5.99]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kASMcZBE008933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 28 Nov 2006 14:38:35 -0800 Message-ID: <456CBA81.5040302@u.washington.edu> Date: Tue, 28 Nov 2006 14:38:57 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.ORG References: <456CA68E.7090207@u.washington.edu> <9ab217670611281324y7e6b9d69g7f8843504b2fbd8d@mail.gmail.com> In-Reply-To: <9ab217670611281324y7e6b9d69g7f8843504b2fbd8d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.2.285561, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2006.11.28.142432 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: Subject: Re: Single UDP sockets : duplex capable? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 22:38:44 -0000 Devon H. O'Dell wrote: > 2006/11/28, Garrett Cooper : >> 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