Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!uunet!sco!seanf From: seanf@sco.COM (Sean Fagan) Newsgroups: comp.unix.questions Subject: Re: How do you trap 1/2 a tcp connection dying ? Message-ID: <8624@scolex.sco.COM> Date: 8 Nov 90 05:59:56 GMT References: <2088@aber-cs.UUCP> <27457@mimsy.umd.edu> <12323:Nov603:18:1990@kramden.acf.nyu.edu> Sender: news@sco.COM Organization: The Santa Cruz Operation, Inc. Lines: 19 In article <12323:Nov603:18:1990@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >I think what Chris means is ``Gaaargh! Hasn't anyone told you that I/O >system calls don't necessarily return the full amount of data you asked >for? That you *have* to check their return values? You're probably >checking the recv() against -1 while it's returning 0! And, of course, when you close the connection, you have to check to make sure that, some unknown number of hours ago, the server didn't just disappear, or you didn't overflow your quota, or daylight savings didn't come into action causing some packet you send a few thousand packets ago to suddenly be invalid. -- -----------------+ Sean Eric Fagan | "*Never* knock on Death's door: ring the bell and seanf@sco.COM | run away! Death hates that!" uunet!sco!seanf | -- Dr. Mike Stratford (Matt Frewer, "Doctor, Doctor") (408) 458-1422 | Any opinions expressed are my own, not my employers'.