From owner-freebsd-hackers Mon May 10 11: 9:12 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from sol (cs1-gw.cs.binghamton.edu [128.226.171.72]) by hub.freebsd.org (Postfix) with SMTP id 288D8159F6 for ; Mon, 10 May 1999 11:09:01 -0700 (PDT) (envelope-from zzhang@cs.binghamton.edu) Received: from localhost (zzhang@localhost) by sol (SMI-8.6/8.6.9) with SMTP id NAA29325 for ; Mon, 10 May 1999 13:57:47 -0400 Date: Mon, 10 May 1999 13:57:46 -0400 (EDT) From: Zhihui Zhang To: freebsd-hackers@freebsd.org Subject: Sockets and SYSTEM V message queue 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 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