From owner-freebsd-hackers Mon May 10 12:13:44 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from ns1.cybersites.com (unknown [207.92.123.2]) by hub.freebsd.org (Postfix) with ESMTP id E6D0314E37 for ; Mon, 10 May 1999 12:13:37 -0700 (PDT) (envelope-from cyouse@cybersites.com) Received: from localhost (cyouse@localhost) by ns1.cybersites.com (8.9.2/8.9.2) with ESMTP id PAA73905; Mon, 10 May 1999 15:10:29 -0400 (EDT) (envelope-from cyouse@cybersites.com) X-Authentication-Warning: ns1.cybersites.com: cyouse owned process doing -bs Date: Mon, 10 May 1999 15:10:29 -0400 (EDT) From: Chuck Youse To: Zhihui Zhang Cc: 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 Binding the socket actually creates the entry in the filesystem, and as stated in the manpage for bind(2), you must unlink it to get rid of it when you're finished. As the other respondent mentioned (my apologies to that other respondent, I've already deleted your reply and hence don't have your name handy), using UNIX domain sockets makes migration to separate machines more difficult. It might be better to bind an AF_INET socket to 127.0.0.1 (to prevent other machines from accessing the service, if that's your concern) .. the loopback interface is pretty quick about turning packets around, so there's little (if any) performance hit. Chuck Youse Director of Systems cyouse@cybersites.com 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. > > -Zhihui > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message