This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Branch off an association into a separate socket
#include <netinet/sctp.h> int sctp_peeloff(int sd, sctp_assoc_t assoc_id);
libsctp
Use the -l sctp option to qcc to link against this library.
You call this function to branch off an association into a separate socket. The new socket is a one-to-one style socket. You should confine your operation to one that is allowed for a one-to-one style socket.
Using sctp_peeloff(), you create a new socket descriptor as follows:
new_sd = sctp_peeloff(int sd, sctp_assoc_t assoc_id);
On success, it returns a new socket, which has the single association in it. On failure, it returns -1 and 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_recvmsg(), sctp_sendmsg()