*BSD News Article 92150


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.mel.connect.com.au!news.mel.aone.net.au!news.netspace.net.au!news.mira.net.au!news.vbc.net!vbcnet-west!knews.uk0.vbc.net!vbcnet-gb!azure.xara.net!xara.net!dispatch.news.demon.net!demon!news.sprintlink.net!news-peer.sprintlink.net!newsfeed.nacamar.de!news.nacamar.de!uunet!in1.uu.net!202.232.2.100!np1.iij.ad.jp!nf0.iij.ad.jp!nr0.iij.ad.jp!news.iij.ad.jp!news.CET.CO.JP!usenet
From: Michael Hancock <michaelh@cet.co.jp>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Sys V Streams Vs. BSD Sockets
Date: Tue, 25 Mar 1997 13:06:43 -0800
Organization: CET
Message-ID: <33383E63.754@cet.co.jp>
References: <5h4rte$92a@news.interlog.com>
NNTP-Posting-Host: chaos.cet.co.jp
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.0b2 (WinNT; I)
X-Priority: 3 (Normal)
Lines: 24
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:37914

Paul Griffith wrote:
> 
> I know this is a generic Unix question (if there is such a thing), but
> where can I find a FAQ on the major differences in streams and sockets
> ? Is one better for some tasks ??

I don't know if there's a FAQ for this.

The interfaces are similar, but the semantics are very different.  For
example sockets return errors synchronously while in streams errors are
usually returned asynchronously.

Streams can be parallelized easier on SMP systems, but streams
implementations typically also have more overhead than sockets.

You should get some books on Unix programming.  Richard Stevens' books
cover mostly sockets.  Steve Rago wrote a book on SYSV that probably
covers streams.  For a general survey of various Unix systems read, Unix
Internals: The New Frontiers, by Uresh Vahalia.

Regards,


Mike Hancock