generateOffer and CreateDataChannel APIs#30
Open
mo3rfan wants to merge 14 commits intochadnickbok:masterfrom
Open
generateOffer and CreateDataChannel APIs#30mo3rfan wants to merge 14 commits intochadnickbok:masterfrom
mo3rfan wants to merge 14 commits intochadnickbok:masterfrom
Conversation
Owner
|
Howdy; did you want me to take a look at this, or are you closing while some more changes are made? |
Contributor
Author
|
I closed this to make some more changes. Will reopen once it's ready :) |
Contributor
Author
|
EDIT: Totally forgot that I hardcoded a few stuff and probably need to add a few things for the SCTP layer on handling different channel types. |
Owner
|
Awesome, thanks for sharing all this hard work! I'll try to take a look at this tonight and get back to you asap. |
This is to test the newly implemented GenerateOffer API.
Previously, the data channel object was not being created for the peer that generates the offer/datachannel. Included fixes: * Send ACK after receiving DATA_CHANNEL_OPEN * Pass and return uint16_t for all SIDs instead of int * Calls new channel and on_open callbacks inside HandleAck * Some formatting fixes
The ACK fails to send on pi/ARM for some reason. Data channel won't be created if this happens, so we'll throw an exception here.
The proper SID needs to be set for sending the acknowledgement on that SID.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to facilitate a connection between two Cpp clients instead of the browser, we've added
PeerConnection::GenerateOffer()andPeerConnection::CreateDataChannel(std::string label, std::string protocol)To see it in action, run the websockets server, followed by
testclientanswerin one terminal andtestclientofferin another, in that order.We've also included some general fixes that we've come across: