EricssonResearch / openwebrtc

A cross-platform WebRTC client framework based on GStreamer
http://www.openwebrtc.org
BSD 2-Clause "Simplified" License
1.8k stars 537 forks source link

Handle partial messages in data channels #703

Open lgrahl opened 6 years ago

lgrahl commented 6 years ago

I've had a glance at your code and it seems you're not handling the MSG_EOR flag which means you will treat incoming partial SCTP messages as whole messages, thus violating the message-oriented principle of SCTP (and data channels). This is a widespread issue in many implementations we're currently trying to clean up.

If you need help, you can look at the relevant section in RAWRTC's code or at Mozilla's implementation. I'm the author of RAWRTC and I've also worked on Mozilla's data channel code, so feel free to ping me if you have any questions.

Tracked (and resolved) for Firefox in bug 979417. For Chromium, this is tracked in issue 7774.

stefhak commented 6 years ago

Thanks for pointing this out and for providing the pointers.