This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Receive a message, using advanced SCTP features
#include <netinet/sctp.h> ssize_t sctp_recvmsg(int s, void *msg, size_t len, struct sockaddr *from, socklen_t *fromlen, struct sctp_sndrcvinfo *sinfo, int *msg_flags);
libsctp
Use the -l sctp option to qcc to link against this library.
The sctp_recvmsg() function receives a message from socket s, whether or not a socket is connected. The difference between this function and the generic function, recvmsg(), is that you can pass in a pointer to a sctp_sndrcvinfo structure, and the structure is filled upon receipt of the message. The structure has detailed information about the message you just received.
You must enable sctp_data_io_events with the SCTP_EVENTS socket option first, to be able to have the sctp_sndrcvinfo structure be filled in. |
The number of bytes received, or -1 if an error occurs (errno is set).
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
SCTP, sctp_bindx(), sctp_connectx(), sctp_freeladdrs(), sctp_freepaddrs(), sctp_getladdrs(), sctp_getpaddrs(), sctp_peeloff(), sctp_sendmsg()