-
-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Discussed in #263
Originally posted by reececomo July 25, 2023
I think Geckos.io would benefit from creating two separate datachannels per connection, one for unreliable and one for reliable.
That would allow certain messages to leverage the existing (super fast) reliable mode at the network layer instead of reimplementing it at the application layer.
// UDP-like channel for realtime data (e.g. binary, serialized game state packets).
const unreliable = RTCPeerConnection.createDataChannel("unreliable", {
ordered: false,
maxRetransmits: 0
});
// TCP-like channel for reliable data (e.g. chat message, ad-hoc game state events).
const reliable = RTCPeerConnection.createDataChannel("reliable", {
ordered: true, // optional?
maxRetransmits: 10 // Use constant
});
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed