Sharing SCTP connection with multiple threads

Posted by poly on Programmers See other posts from Programmers or by poly
Published on 2012-05-02T01:41:07Z Indexed on 2012/06/01 10:49 UTC
Read the original article Hit count: 272

Filed under:
|
|

I have an application that needs to run in SCTP environment, I have a question in sharing the connection among multiple threads for packet receiving only, I've tried with the sctp_sendmsg and it worked without even locking the threads (is that been taking care of by the OS, in other words, is it thread safe to do that). I've tested many cases with the send and I can't see them out of sync.

Anyway, back to the receiving, is it possible to create multiple threads and send each thread the sctp descriptor to start receiving messages? Do I need a lock here or is it ok without lock?

I'm using C in linux.

© Programmers or respective owner

Related posts about c

    Related posts about multithreading