Date: Mon, 10 May 1999 14:48:48 -0500 (EST) From: Alfred Perlstein <bright@rush.net> To: Zhihui Zhang <zzhang@cs.binghamton.edu> Cc: Chuck Youse <cyouse@cybersites.com>, freebsd-hackers@FreeBSD.ORG Subject: Re: Sockets and SYSTEM V message queue Message-ID: <Pine.BSF.3.96.990510144409.24802K-100000@cygnus.rush.net> In-Reply-To: <Pine.GSO.3.96.990510142747.29300B-100000@sol.cs.binghamton.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 10 May 1999, Zhihui Zhang wrote: > > On Mon, 10 May 1999, Chuck Youse wrote: > > > > > That's why you can create sockets in the UNIX domain (AF_UNIX, later > > renamed AF_LOCAL). When you bind a UNIX domain socket, it's bound to a > > name in the filesystem. > > Thanks for the reply. So a socket must be bound to something to be used. > You mention a name in the filesystem, does the file exist before binding > or not? It seems to be a temporary file. You would benifit greatly by purchaing "Unix Netowrk Programming Vol 1" by Stevens. several things: you can communicate locally via a socket, the kernel detects this and uses the loopback device, i'm quite sure that it will use a fast impelementation of a local pipe you can use named socket, yes they _do_ appear in the filesystem, the entry should look like a directory, except that the 'd' is an 's' the only "problem" with sockets instead of SYSV messages is that there are no "boundries", it's just a stream of binary gloop, SYSV message queues allow you to specify the size of each message sent. Otherwise you have to sort of fake it and agree on a protocol for expressing message size... does this make sense? -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990510144409.24802K-100000>