-
Notifications
You must be signed in to change notification settings - Fork 811
Split up RTCDtlsTransport.start() #1307
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1307 +/- ##
========================================
Coverage ? 100.00%
========================================
Files ? 30
Lines ? 5828
Branches ? 0
========================================
Hits ? 5828
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I'm about to land a large patch which tightens our type definitions, so this is unfortunately going to need rebasing when #1309 lands :) |
to make the individual steps more clear
49293dd
to
57d237a
Compare
Rebased without merge conflicts! |
# For WebRTC, the DTLS role is explicitly determined as part of the | ||
# offer / answer exchange. | ||
# | ||
# For ORTC however, we determine the DTLS role based on the ICE role. | ||
if self._role == "auto": | ||
if self.transport.role == "controlling": | ||
self._set_role("server") | ||
else: | ||
self._set_role("client") | ||
|
||
# Initialise SSL. | ||
self._ssl = SSL.Connection( | ||
self.__local_certificate._create_ssl_context( | ||
srtp_profiles=self._srtp_profiles | ||
) | ||
) | ||
if self._role == "server": | ||
self._ssl.set_accept_state() | ||
else: | ||
self._ssl.set_connect_state() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come this is not part of do_handshake
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The distinction I made was "do_handshake will actually send packets"
While I don't have a strong reason not to merge this, I'm kind of lacking an incentive to do so, do you have any follow up changes in mind? |
Prototyping DTLS-in-STUN described here. |
to make the individual steps more clear
(quite interesting that the DTLS transport has no getRemoteParameters() and hence does not store them)