Failing to send message via sctp data channel

174 views
Skip to first unread message

Andriy Buchynskyy

unread,
Nov 6, 2018, 4:58:13 AM11/6/18
to discuss-webrtc
Hello. I have problem with sending messages via sctp data channel. 
WebRTC informs me that it is too long. I receive these logs :

[000:494] [3808] (sctptransport.cc:553): ERROR:SctpTransport->SendData(...):  usrsctp_sendv:  : [0x0000005a] Message too long
[000:495] [3809] (datachannel.cc:582): Closing the DataChannel due to a failure to send data, send_result = 1


Thank you for help. 

Lennart Grahl

unread,
Nov 6, 2018, 3:23:16 PM11/6/18
to discuss-webrtc
The libwebrtc implementation only supports 64 KiB messages, see https://webrtc.org/web-apis/chrome/

If you want to be compatible with all browsers, you will unfortunately have to fragment your messages into 64 KiB chunks and reassemble on the remote side.

Cheers
Lennart

Danilo

unread,
Nov 7, 2018, 3:51:08 AM11/7/18
to discuss-webrtc
Hi Andriy


On Tuesday, November 6, 2018 at 9:23:16 PM UTC+1, Lennart Grahl wrote:
If you want to be compatible with all browsers, you will unfortunately have to fragment your messages into 64 KiB chunks and reassemble on the remote side.

Andriy Buchynskyy

unread,
Nov 7, 2018, 5:17:33 AM11/7/18
to discuss-webrtc
Hello guys, thank you for your replies. I have few more question. 
If I will use chunking how it will influence on performance if we talk about video streaming? Because I use data channel to stream video.
Also wanted to ask if there is c++ chunk library because I use native c++ webrtc code.

Lennart Grahl

unread,
Nov 7, 2018, 4:31:41 PM11/7/18
to discuss-webrtc
Is it real-time media? Then, don't use data channels for that purpose. If not, you should be fine to use them.

The performance impact of fragmentation/reassembly in the browser depends on your use case. If you are showing a video in the browser, you should transmit the data in chunks anyway and don't need to reassemble on your own.

I'm not aware of a C++ library for that purpose but it's easy to write.

Cheers
Lennart

Andriy Buchynskyy

unread,
Nov 8, 2018, 7:08:51 AM11/8/18
to discuss-webrtc
Yes, it is real-time media. I'm sending sequence of images
Reply all
Reply to author
Forward
0 new messages