Date: Fri, 14 Mar 1997 13:11:58 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: joerg_wunsch@uriah.heep.sax.de Cc: jehamby@lightside.com, hackers@freebsd.org Subject: Re: My pipe is getting muddled?! Message-ID: <199703142011.NAA01395@phaeton.artisoft.com> In-Reply-To: <19970314095906.UD59927@uriah.heep.sax.de> from "J Wunsch" at Mar 14, 97 09:59:06 am
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703142011.NAA01395>