Seems datachannel.send() blocked by reading channel
See original GitHub issuewhile True
in rtcsctptransport.py blocks event loop if queue full on receive here
My suggestion is to rewrite it using asyncio.Queue
but it is not trivial
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Is RTCDataChannel send() a synchronous/blocking call?
send() is asynchronous/non-blocking, then this will get tricky since it doesn't seem like .send() accepts a callback function, and I want to ...
Read more >RTCDataChannel.send() - Web APIs - MDN Web Docs
The send() method of the RTCDataChannel interface sends data across the data channel to the remote peer. This can be done any time...
Read more >Send data between browsers with WebRTC data channels
In these examples, the browser makes a peer connection to itself, then creates a data channel and sends a message through the peer...
Read more >Massive drop in data channel throughput when increasing ...
Seems like after a certain number of sent packets, the sender will stop sending entirely and wait for ACK packets before sending more...
Read more >Go (Golang) Channels Tutorial with Examples
When data is sent to a channel, the control is blocked in the send statement until some other Goroutine reads from that channel....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
^ FYI: I might actually pick this up at some point and implement it myself. Don’t rely on it though. 😺
Something like this:
If the user is interested in controlling the flow in its fullest form, it needs to use streams for messages. Otherwise, if it expects message size to not be an issue, it can also utilise bytes.
send
could also be split up intosend(message: Union[bytes, asyncio.StreamWriter])
andcreate_message() -> asyncio.StreamWriter
.