From owner-freebsd-hackers Mon May 10 11:28: 7 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 7EC1F14C1E for ; Mon, 10 May 1999 11:28:01 -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 OAA70474; Mon, 10 May 1999 14:24:52 -0400 (EDT) (envelope-from cyouse@cybersites.com) X-Authentication-Warning: ns1.cybersites.com: cyouse owned process doing -bs Date: Mon, 10 May 1999 14:24:52 -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 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. Chuck Youse Director of Systems cyouse@cybersites.com On Mon, 10 May 1999, Zhihui Zhang wrote: > > My impression is that whenever you create a socket, you bind to some IP > address. If you creates two sockets on the same machine, these two > sockets will bind to the same IP address (assuming that the machine has > only one NIC). When these two sockets communicate with each other, the OS > should be smart enough to figure out that they associated with the same IP > address and therefore do not actually send packets out to the network. > > If this is the case, why do we bind a socket to an IP address. I mean, > the sockets should be able to be used alone. If they have to be bound to > an IP address to be used, why do not we use message queue of SYS V? If > so, which mechanism is better - message queue or standalone socket? > > I hope some guru will enlightment me on this subject. > > Any help is appreciated. > > > -------------------------------------------------- > Zhihui Zhang. Please visit http://www.freebsd.org > -------------------------------------------------- > > > > 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