Subject: meaning of retunr of 0 for recvmsg

From: Oliver Kowalke <[email-masked]>
Date: Mon, 22 Jan 2007 17:48:29 +0100

Hello,

What does it mean if recvmsg returns 0 for
1) SCTP socket created with SOCK_STREAM -> the same as for TCP sockets == 
EOF (peer has closed connection prematurely)?
1) SCTP socket created with SOCK_SEQPACKET -> the same as for UDP == SCTP 
message was sended with 0 bytes length?

kind regards,
Oliver Kowalke

---

From: Randall Stewart <[email-masked]>
Date: Tue, 23 Jan 2007 09:27:32 -0500

> EOF (peer has closed connection prematurely)?

Either that or you would get a -1 with ENOTCONN or something
like that..

> message was sended with 0 bytes length?

0 byte messages are NOT allowed in SCTP. So such a return from
a 1-2-many socket really should not happen.. at least I can't
think of where it would.

Thats why if you are using the 1-2-many model your need to
enable assoc events so you can tell when someone goes away :-)

R

-- 
Randall Stewart
NSSTG - Cisco Systems Inc.
803-345-0369 <or> 803-317-4952 (cell)