Commit graph

7 commits

Author SHA1 Message Date
Taylor Brandstetter
3a034e15b4 Split DataChannel into two separate classes for RTP and SCTP.
Done in preparation for some threading changes that would be quite
messy if implemented with the class as-is.

This results in some code duplication, but is preferable to
one class having two completely different modes of operation.

RTP data channels are in the process of being removed anyway,
so the duplicated code won't last forever.

Bug: webrtc:9883
Change-Id: Idfd41a669b56a4bb4819572e4a264a4ffaaba9c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178940
Commit-Queue: Taylor <deadbeef@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31691}
2020-07-10 00:03:21 +00:00
Tomas Gunnarsson
2e94de596e Add GetSctpStats to PeerConnectionInternal, remove sctp_data_channels()
This removes code from DataChannelController that exposes
an internal vector of data channels and puts the onus of
returning stats for a data channel, on the data channel
object itself. This will come in handy as we make threading
changes to the data channel object.

Change-Id: Ie164cc5823cd5f9782fc5c9a63aa4c76b8229639
Bug: webrtc:11547, webrtc:11687
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177244
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31533}
2020-06-16 16:36:42 +00:00
Tomas Gunnarsson
7d3cfbf90d Inject signaling and network threads to DataChannel.
Add a few DCHECKs and comments about upcoming work.

Bug: webrtc:11547
Change-Id: I2d42f48cb93f31e70cf9fe4b3b62241c38bc9d8c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177106
Reviewed-by: Taylor <deadbeef@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31530}
2020-06-16 10:22:19 +00:00
Harald Alvestrand
ab81316411 Housekeeping: Declare DataChannelController immovable
This should be done according to the C++ style guide.

Bug: none
Change-Id: I3f8d36339bbc7175bd67631e38820b5883e875d5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165386
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30204}
2020-01-09 21:33:54 +00:00
Harald Alvestrand
2697ac1a1b Stop an SCTP connection when the DTLS transport closes.
This CL propagates a "closed" signal from DTLS up to the
SCTP section of the data channel controller, where it causes
closing of all open datachannels.

Bug: chromium:1030631, webrtc:10360
Change-Id: I88bb9e1aff5c25f330edfd092ef609d4fcc3a9f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/162206
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30099}
2019-12-16 14:54:56 +00:00
Harald Alvestrand
246724b0fe Move messaging -> PostTask for freeing datachannels
I could find no reason for the extra complexity of doing messaging
in order to schedule a task to be done after the current cycle.
It also simplifies the peerconnection/datachannelcontroller coupling.

Bug: webrtc:11146
Change-Id: I68f45059b9f4a6869fb44b856e05a480f4652365
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161232
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29997}
2019-12-03 22:57:17 +00:00
Harald Alvestrand
05e4d08e35 Refactoring DataChannelController from PeerConnection part 4
This CL:
- Moved HasDataChannel and data_channel_type_
- Moved rtp_data_channels_
- Moved sctp_data_channels_
- Moved data_channel_controller to its own .h file
- Various changes to reduce the coupling between the classes
- Removed friendship between DataChannelController and PeerConnection

Bug: webrtc:11146
Change-Id: Ib8c395e4c90ce34baf40812d1dade0ffa79f2438
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161094
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29987}
2019-12-03 15:35:09 +00:00