Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 May 1997 08:59:02 +0200
From:      j@uriah.heep.sax.de (J Wunsch)
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: socketpair()
Message-ID:  <19970510085902.LT52179@uriah.heep.sax.de>
In-Reply-To: <199705100617.QAA00363@labs.usn.blaze.net.au>; from David Nugent on May 10, 1997 16:17:26 %2B1000
References:  <199705100617.QAA00363@labs.usn.blaze.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
As David Nugent wrote:

> What are the advantages (if any) of using socketpair(PF_LOCAL, ...
> as compared with pipe()?

socketpair() is guranteed to create a bidirectional connection.
pipe() incidentally does this in 4.4BSD, and i think also in FreeBSD
(which is now different from 4.4BSD since it has John D's revamped
pipe code), i think also in SVR4.

pipe() is way faster in FreeBSD, since it avoids the overhead from the
network layers.  I don't think that PF_LOCAL implements OOB data, so
you don't lose anything by using pipe() except portability when it
comes to a bidirectional connection.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970510085902.LT52179>