From owner-freebsd-hackers Mon May 10 12:27:45 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from cygnus.rush.net (cygnus.rush.net [209.45.245.133]) by hub.freebsd.org (Postfix) with ESMTP id ED19E14FB0 for ; Mon, 10 May 1999 12:27:04 -0700 (PDT) (envelope-from bright@rush.net) Received: from localhost (bright@localhost) by cygnus.rush.net (8.9.3/8.9.3) with SMTP id OAA00025; Mon, 10 May 1999 14:48:50 -0500 (EST) Date: Mon, 10 May 1999 14:48:48 -0500 (EST) From: Alfred Perlstein To: Zhihui Zhang Cc: Chuck Youse , freebsd-hackers@FreeBSD.ORG Subject: Re: Sockets and SYSTEM V message queue 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 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