From owner-freebsd-hackers Sat Jan 30 11:10:23 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA26542 for freebsd-hackers-outgoing; Sat, 30 Jan 1999 11:10:23 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dragon.ham.muohio.edu (dragon.ham.muohio.edu [134.53.147.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA26536 for ; Sat, 30 Jan 1999 11:10:20 -0800 (PST) (envelope-from howardjp@dragon.ham.muohio.edu) Received: from localhost (howardjp@localhost) by dragon.ham.muohio.edu (8.9.1/8.9.1) with ESMTP id OAA12394; Sat, 30 Jan 1999 14:26:46 -0500 Date: Sat, 30 Jan 1999 14:26:46 -0500 (EST) From: Jamie Howard To: Cory Kempf cc: freebsd-hackers@FreeBSD.ORG Subject: Re: socketpair(2) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 30 Jan 1999, Cory Kempf wrote: > socketpair(2) only works with unix domain sockets, not inet domain sockets. > It is a hack to allow the creation of pair of connected sockets. This is only > useful when both client and server live on the same machine. If you want > internet domain sockets, you will need to go throught the > socket/bind/connect/listen/accept mechanism. Right, but it seems as though a UNIX domain socket will allow a process to read off the socket that which it has just written, when bidirectional, correct? (Or am I doing something wrong?) It would be nice if two connected processes could send data back and forth without reading off their own output, and a TCP connection implements this. (I think this is similar to a channel under Plan 9/Alef, but I do not know for certain due to lack of access.) Have I missed something here? Additionally, this is something of a learning experience, to an extent, it doesn't matter how usefull the function is, the more important issue is can I implement it without screwing up too badly? :) Jamie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message