From owner-freebsd-hackers Fri Mar 14 16:15:21 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id QAA21749 for hackers-outgoing; Fri, 14 Mar 1997 16:15:21 -0800 (PST) Received: from agora.rdrop.com (root@agora.rdrop.com [199.2.210.241]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id QAA21734 for ; Fri, 14 Mar 1997 16:15:09 -0800 (PST) Received: from phaeton.artisoft.com by agora.rdrop.com with smtp (Smail3.1.29.1 #17) id m0w5dX6-00093wC; Fri, 14 Mar 97 12:24 PST Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id NAA01395; Fri, 14 Mar 1997 13:11:58 -0700 From: Terry Lambert Message-Id: <199703142011.NAA01395@phaeton.artisoft.com> Subject: Re: My pipe is getting muddled?! To: joerg_wunsch@uriah.heep.sax.de Date: Fri, 14 Mar 1997 13:11:58 -0700 (MST) Cc: jehamby@lightside.com, hackers@freebsd.org In-Reply-To: <19970314095906.UD59927@uriah.heep.sax.de> from "J Wunsch" at Mar 14, 97 09:59:06 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > The thing is, I've been trying to figure out (using truss), how > > Solaris manages to do a very similar thing in the X server with > > FIFO's, and I can't for the life of me figure out what crazy STREAMS > > nonsense they're using. The nearest I can tell, there is some sort > > of multiplexor in there, because when a new client connects, the > > server does an ioctl(fd, I_RECVFD, &buf), and pulls a new file > > descriptor out of the stream, and communicates with the client on > > that. > > Isn't this what the STREAMS people call cloning? (I have no clues > about STREAMS, but i'm sure Terry will respond with a message not > below 200 lines very quickly. :-) It's called a mux (multiplexor), not cloning. The mux fans out the stream to multiple streams, or it fans in several streams to one view at the stream head. In the case described, it looks like they are associating a descriptor with a particular muxed channel, where you also have a descriptor for the channel. There are *many* good reasons for doing this, including the ability to use I/O returns from anonymous engines for "hot engine scheduling". > I think local domain sockets are your best bet. Their handling is > supposedly not much different from PF_INET sockets. I think they > don't support OOB messages, but that's probably not what you're > looking for anyway. This may not accomplish the "remote" connection/fd correspondance that they seem to be going for (from the admittely tiny description provided). Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.