webrtc icon indicating copy to clipboard operation
webrtc copied to clipboard

Error: Outbound packet larger than maximum message size 65535

Open enobufs opened this issue 5 years ago • 1 comments

Your environment.

What did you do?

Try to send data channel message with length 64KB

What did you expect?

Successfully sent.

What happened?

Errored with:

 Outbound packet larger than maximum message size 65535

Here's where the error originates.

There are three problems:

  1. By default it should allow 64KB
  2. SCTPTransport has remoteMaxMessageSize, but this doesn't get propagated to pion/sctp
  3. remoteMaxMessageSize should be updated based on max-message-size in SDP.

@Sean-Der do we parse max-message-size in SDP, and do we send it?

enobufs avatar Sep 03 '20 08:09 enobufs

@Sean-Der I have fixed the default value at pion/[email protected]. (the number 1)

In the change, I also added:

  • MaxMessageSize param to sctp.Config struct
  • MaxMessageSize() to sctp.Association
  • SetMaxMessageSize() to sctp.Association

So that we could accomplish 2 and 3 I mentioned earlier at pion/webrtc (SctpTransport).

enobufs avatar Sep 12 '20 05:09 enobufs