Date: Mon, 10 May 1999 15:10:29 -0400 (EDT) From: Chuck Youse <cyouse@cybersites.com> To: Zhihui Zhang <zzhang@cs.binghamton.edu> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Sockets and SYSTEM V message queue Message-ID: <Pine.BSF.4.05.9905101502230.58619-100000@ns1.cybersites.com> 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
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9905101502230.58619-100000>