*BSD News Article 79170


Return to BSD News archive

#! rnews 1231 bsd
Newsgroups: comp.unix.programmer,comp.unix.bsd,comp.unix.questions
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!ihnp4.ucsd.edu!newshub.nosc.mil!news!news
From: Grace Huynh <gpham@cod.nosc.mil>
Subject: Connection return value
Content-Type: text/plain; charset=us-ascii
Message-ID: <32493418.1604@cod.nosc.mil>
Sender: news@nosc.mil
Reply-To: gpham@cod.nosc.mil
Content-Transfer-Encoding: 7bit
Cc: gpham, huynhr
Organization: NRaD
Mime-Version: 1.0
Date: Wed, 25 Sep 1996 13:31:04 GMT
X-Mailer: Mozilla 3.0b6Gold (Win95; I)
Lines: 17
Xref: euryale.cc.adfa.oz.au comp.unix.programmer:43770 comp.unix.bsd:16829 comp.unix.questions:88263

When I go through the socket programming book,  I couldn't find anything
that mention
about return a value equal exactly 0.  The book only covers > 0 or <0,
but nothing about equal to 0.  So please confirm this with me.

If connect() system call return a value < 0 then connection is not
success.
If connect() system call return a value > 0 then the socket successully
connect

What if connect() return a value == 0?  And this is my case.  To me,
It's means my connection is success correct?


Thanks alot

Grace