I am having an socket to receive data from multiple clients.
sockfd = socket(...);
bind(sockfd, ...);
listen(sockfd, ...);
while (true) {
nread = sctp_rcvmsg(sockfd, ..., buf, ..., &info);
assoc_id = sinfo.sinfo_assoc_id;
stream = sinfo.sinfo_stream;
handle_message(assoc_id, stream, buf, nread);
}
I get the association Id for each connection. My question is how can I send the response message on the association ID rather than using the client address(eg sctp_sendmsg doesnt have associaiton ID parameter)