Skip to content

Making an unordered unreliable datachannel doesn't seem possible #371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
echeese opened this issue Dec 16, 2022 · 7 comments · Fixed by #609
Closed

Making an unordered unreliable datachannel doesn't seem possible #371

echeese opened this issue Dec 16, 2022 · 7 comments · Fixed by #609
Labels
enhancement New feature or request subcrate:data For issues specific to the data crate

Comments

@echeese
Copy link

echeese commented Dec 16, 2022

Creating a datachannel with ordered = false and (max_retransmits = 0 or max_packet_lifetime = 0) seems to fall back to making a reliable channel.

The receiving other client has maxPacketLifeTime: null and maxRetransmits: null

@k0nserv
Copy link
Member

k0nserv commented Jan 4, 2023

Hey @echeese, could you provide a minimal reproducible example of this? I probably won't have time to work on it but if it is indeed a bug having such an example would be good

@k0nserv
Copy link
Member

k0nserv commented Jan 9, 2023

@echeese Looking at #186 and webrtc-rs/data#5 I think you are just correct. No need to create a minimal repro.

Someone who's interested in this could ressurect the PRs from @connorcarpenter

@k0nserv k0nserv added subcrate:data For issues specific to the data crate enhancement New feature or request labels Jan 9, 2023
@echeese
Copy link
Author

echeese commented Jan 9, 2023

Sorry for the lack of response, I was on vacation, but yes those PRs seem to match my findings

@k0nserv
Copy link
Member

k0nserv commented Jan 9, 2023

No problem, if you wanna work on this it'd be great. I wouldn't expect it to get fixed unless someone with a desire for the use-case contributes a fix

@zduny
Copy link

zduny commented Jan 17, 2023

I have something: zduny@8a9138c

References:
https://github.com/pion/webrtc/blob/master/datachannel.go
https://stackoverflow.com/questions/54292824/webrtc-channel-reliability

But it would be nice to add a test checking if unreliable channel is created.
@echeese - what was your method of checking if created channel is unreliable?

@CouleeApps
Copy link

What's the status on this? It seems like that PR was closed after submodule changes and was never actually merged. If needed, I can remake them, since it seems like nobody else actually cares about this use-case... strange considering the various rust game engines basing their netcode on this library without actually ... trying it.

@ris-work
Copy link
Contributor

I do care; I don't care about reliability as I will be doing TCP inside WebRTC for my use case if I really need it. I have also created a set of patches (in my profile) which tries to disable all forms of reliability for the packets and all forms of congestion control and stats collection, if you're interested. It has made it lighter, too.

Also a surprising observation: Tokio Mutexes and Semaphores are surprisingly too slow, so I switched some things to native threads, it made it work like 100x faster. Last time a performance bottleneck was fixed by just removing tokio semaphores and it made things magically 3x faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request subcrate:data For issues specific to the data crate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants