Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!tezcat!cam-news-hub1.bbnplanet.com!www.nntp.primenet.com!nntp.primenet.com!dispatch.news.demon.net!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail From: brian@anorak.coverform.lan (Brian Somers) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: How to open a socket under FreeBSD? Date: 5 Nov 1996 10:35:41 -0000 Organization: Coverform Ltd. Lines: 22 Sender: brian@awfulhak.demon.co.uk Message-ID: <55n59t$qp@anorak.coverform.lan> References: <GORSKI.96Oct26172702@axiom.www.xxx> <550ou1$2u0@anorak.coverform.lan> <327DFE29.ABD322C@FreeBSD.org> Reply-To: brian%anorak.coverform.lan@awfulhak.demon.co.uk NNTP-Posting-Host: anorak.coverform.lan X-NNTP-Posting-Host: awfulhak.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Newsreader: knews 0.9.8 In article <327DFE29.ABD322C@freebsd.org>, "Jordan K. Hubbard" <jkh@FreeBSD.org> writes: : Brian Somers wrote: >> The idea is that you create a socket, then either connect it to another >> existing socket (via connect) or wait for a connection to occur >> (via bind). You can have different kind of sockets - normally either : : Erm, not *quite* but close. Client creates a socket and connects it to : the server address with connect. Server creates a socket, binds it to : its address and then waits for new connections on it with accept(). : Bind itself does not wait. : : This all assumes stream sockets, of course, and the connected socket : model. :-) And a quick call to listen() is always a good idea :) -- Brian <brian%anorak.coverform.lan@awfulhak.demon.co.uk> <http://www.awfulhak.demon.co.uk/> Don't _EVER_ lose your sense of humour.... .