Skip to content
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

unreliable channels? #34

Open
an-kumar opened this issue Nov 25, 2017 · 4 comments
Open

unreliable channels? #34

an-kumar opened this issue Nov 25, 2017 · 4 comments

Comments

@an-kumar
Copy link

Looking through the DataChannel.hpp channel types, there doesn't seem to be an unreliable option. Perhaps I am mis-understanding what webRTC means by unreliable -- is "reliable_unordered" what I am looking for? What I was expecting unreliable to be would be both unordered (of course) but also no guarantee of sending the data, whereas reliable_unordered sounds to me like it would be unordered but data would be re-sent until acknowledged on the other side (which I don't care about).

@mo3rfan
Copy link
Contributor

mo3rfan commented Nov 26, 2017

Here are the explanations from https://tools.ietf.org/html/draft-ietf-rtcweb-data-protocol-08#section-5.1.
I think the "PARTIAL_RELIABLE" ones might be the what you are looking for.

      DATA_CHANNEL_RELIABLE (0x00):  The Data Channel provides a
         reliable in-order bi-directional communication.

      DATA_CHANNEL_RELIABLE_UNORDERED (0x80):  The Data Channel provides
         a reliable unordered bi-directional communication.

      DATA_CHANNEL_PARTIAL_RELIABLE_REXMIT (0x01):  The Data Channel
         provides a partially-reliable in-order bi-directional
         communication.  User messages will not be retransmitted more
         times than specified in the Reliability Parameter.

      DATA_CHANNEL_PARTIAL_RELIABLE_REXMIT_UNORDERED (0x81):  The Data
         Channel provides a partial reliable unordered bi-directional
         communication.  User messages will not be retransmitted more
         times than specified in the Reliability Parameter.

      DATA_CHANNEL_PARTIAL_RELIABLE_TIMED (0x02):  The Data Channel
         provides a partial reliable in-order bi-directional
         communication.  User messages might not be transmitted or
         retransmitted after a specified life-time given in milliseconds 
         in the Reliability Parameter.  This life-time starts
         when providing the user message to the protocol stack.

      DATA_CHANNEL_PARTIAL_RELIABLE_TIMED_UNORDERED (0x82):  The Data
         Channel provides a partial reliable unordered bi-directional
         communication.  User messages might not be transmitted or
         retransmitted after a specified life-time given in milli-
         seconds in the Reliability Parameter.  This life-time starts
         when providing the user message to the protocol stack.

@an-kumar
Copy link
Author

Ah. I think you're right.

Still, in the WebRTC documentation and tutorials, typically the behavior of these unreliable channels is controlled by a 'maxRetries' or 'maxTimeout' style parameter. I can't seem to find where such a parameter might be set in librtcdcpp. And in the absence of a such a parameter, what would the behavior PARTIAL_RELIABLE data channels be?

In fact, scanning through the DataChannel.cpp source code, the chan_type parameter seems to be unused.

@mo3rfan
Copy link
Contributor

mo3rfan commented Nov 26, 2017

Still, in the WebRTC documentation and tutorials, typically the behavior of these unreliable channels is controlled by a 'maxRetries' or 'maxTimeout' style parameter. I can't seem to find where such a parameter might be set in librtcdcpp. And in the absence of a such a parameter, what would the behavior PARTIAL_RELIABLE data channels be?

That parameter would be the reliability parameter for which the proper API is not yet implemented in this library.

In fact, scanning through the DataChannel.cpp source code, the chan_type parameter seems to be unused.

The library does not support initiating a data channel yet. I have a PR for this, but I hardcoded the RELIABLE chan_type and other params like reliability. Plus it would need more tweaks to actually make it work accordingly at the SCTP layer.

@mo3rfan
Copy link
Contributor

mo3rfan commented Dec 7, 2017

I've added the chan_type and reliability features to the API: f20cf66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants