tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: readv() on TCP socket returns 0



Mouse <mouse%Rodents-Montreal.ORG@localhost> wrote:
 |> readv() returns 0 on EOF.  If the file descriptor is a TCP socket, I
 |> guess that means the connexion was closed,
 |
 |Not necessarily.  shutdown(...,SHUT_WR) (or the local equivalent) on
 [.]
 |If you care about portability, I would recommend not counting on this.

shutdown(2) doesn't do that on Mac OS X; iirc it acts just like
close(2), there.

--steffen


Home | Main Index | Thread Index | Old Index