-
Notifications
You must be signed in to change notification settings - Fork 41
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
generateOffer and CreateDataChannel APIs #30
base: master
Are you sure you want to change the base?
Conversation
Howdy; did you want me to take a look at this, or are you closing while some more changes are made? |
I closed this to make some more changes. Will reopen once it's ready :) |
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. |
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.
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
testclientanswer
in one terminal andtestclientoffer
in another, in that order.We've also included some general fixes that we've come across: