Re: Solaris 8 network programming problem



James Antill <james-netnews@xxxxxxx> writes:

read/recv returning 0 on a socket means the other end has shutdown(), and
so there is no more data.

Or a 0 length message was received (non-SOCK_STREAM transports only)

Which is better read or recv ?

It doesn't matter in POSIX, although sometimes it's useful to use recv()
to imply to a programmer that the interface is expecting a socket and
read() to imply that it could be a network socket or a file.

read(2) is at liberty to concatenate UDP messages; recv(2) is not.

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
.



Relevant Pages

  • Re: Can anyone help? :Sparc 5 Solaris 1.1/SunOS 4.1.3
    ... Do you know what Rich Teer means by, ... able proper etiquette I will not bother this newsgroup until I have honed my ... > to opinions held by my employer, Sun Microsystems. ...
    (comp.unix.solaris)
  • Re: High values for UID
    ... The internal disks are completely ... Pointless excercise if you want to reduce space used. ... Expressed in this posting are my opinions. ... to opinions held by my employer, Sun Microsystems. ...
    (comp.unix.solaris)
  • Re: Can anyone help? :Sparc 5 Solaris 1.1/SunOS 4.1.3
    ... versions support SuperSPARC MP or any of the new graphics hardware ... and select the "SS5" (Under EOL systems) ... Expressed in this posting are my opinions. ... to opinions held by my employer, Sun Microsystems. ...
    (comp.unix.solaris)
  • Re: Any reason to use SPARC (vs. x86) these days?
    ... is not (supports serial console but without the ability to ... Expressed in this posting are my opinions. ... to opinions held by my employer, Sun Microsystems. ...
    (comp.sys.sun.hardware)
  • Re: fopen() limit on solaris
    ... resource limits or resource constraints. ... Expressed in this posting are my opinions. ... to opinions held by my employer, Sun Microsystems. ...
    (comp.unix.solaris)