Introduces a struct CreatePortArgs that is similar to the existing
CreateRelayPortArgs and contains parameters that will be passed from
the constructors of descendents of the Port class to the Port.
This struct makes it easier to add new arguments to the port
constructor without changing all inheriting classes.
Rebase of https://webrtc-review.googlesource.com/c/src/+/341021
BUG=webrtc:14626
Change-Id: Id8e5c24a36149e1699e2b42c57e52002d27c86c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345860
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42339}
This reverts commit ed8390d21a.
Reason for revert: Fix has landed in chrome, ready to reland.
Original change's description:
> Revert "Deprecate old constructors and set_type() in Candidate and Port"
>
> This reverts commit aaa6851d53.
>
> Reason for revert: breaks chromium webrtc import
>
> Original change's description:
> > Deprecate old constructors and set_type() in Candidate and Port
> >
> > * Deprecates constructors that use string based `type`
> > * Deprecates string based type functions in favor of enum based.
> > * Restrict possible values of Candidate::type. Ensure a valid value
> > is assigned at construction.
> > * Make Port constructors protected to limit their use to subclasses.
> > - The reason for this is to make sure that use of SharedSocket()
> > is controlled (it adds a bit of complexity).
> > * Simplify construction of Port (remove Construct() etc)
> >
> > Bug: webrtc:15846
> > Change-Id: If24ed674e175642efa49da37fd2bc847dd14f613
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339860
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#41865}
>
> Bug: webrtc:15846
> Change-Id: Ic8b7cba97f8fb207ef51a88900e704658ade28b7
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342140
> Auto-Submit: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Owners-Override: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#41867}
Bug: webrtc:15846
Change-Id: I3d52643bbb537d1c072643528828d26eb18fea94
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342200
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41875}
This reverts commit aaa6851d53.
Reason for revert: breaks chromium webrtc import
Original change's description:
> Deprecate old constructors and set_type() in Candidate and Port
>
> * Deprecates constructors that use string based `type`
> * Deprecates string based type functions in favor of enum based.
> * Restrict possible values of Candidate::type. Ensure a valid value
> is assigned at construction.
> * Make Port constructors protected to limit their use to subclasses.
> - The reason for this is to make sure that use of SharedSocket()
> is controlled (it adds a bit of complexity).
> * Simplify construction of Port (remove Construct() etc)
>
> Bug: webrtc:15846
> Change-Id: If24ed674e175642efa49da37fd2bc847dd14f613
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339860
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41865}
Bug: webrtc:15846
Change-Id: Ic8b7cba97f8fb207ef51a88900e704658ade28b7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342140
Auto-Submit: Ilya Nikolaevskiy <ilnik@webrtc.org>
Owners-Override: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41867}
* Deprecates constructors that use string based `type`
* Deprecates string based type functions in favor of enum based.
* Restrict possible values of Candidate::type. Ensure a valid value
is assigned at construction.
* Make Port constructors protected to limit their use to subclasses.
- The reason for this is to make sure that use of SharedSocket()
is controlled (it adds a bit of complexity).
* Simplify construction of Port (remove Construct() etc)
Bug: webrtc:15846
Change-Id: If24ed674e175642efa49da37fd2bc847dd14f613
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339860
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41865}
This reverts commit d99499abba.
Reason for revert: Breaks downstream projects and I can also repro locally when running the rtc_unittest test target (it does however pass in isolation indicating test cleanup/setup needs to be fixed)
Original change's description:
> p2p: separate ICE tie breaker and foundation seed
>
> BUG=webrtc:14626
>
> Change-Id: I189a708192c9cef0b50c3fcbe798b30376d3b547
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338982
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41806}
Bug: webrtc:14626
Change-Id: If45f8a33395c562c9388b3d3748e8566efa87ecb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341081
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Christoffer Dewerin <jansson@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Owners-Override: Christoffer Dewerin <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41812}
Move code from P2PTransportChannel to Candidate, where we set the
foundation value for remote prflx candidates.
Bug: none
Change-Id: I7dbcb85bca35dca7297136b0706092dd8d2b153c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339902
Reviewed-by: Philipp Hancke <phancke@microsoft.com>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41774}
This CL does:
- Run IWYU on the relevant elements
- Make connection depend on port_interface, not port
- Make port_allocator depend only on port
- Move some constants from port.h into p2p_constants
This allows a dependency graph without ugly groups.
Bug: webrtc:15796
Change-Id: I0ff0e14eacdfe3b230a8d84902a78eb062d6c8af
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336320
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41618}
The absl::string_view versions can now be made pure virtual due to
downstream client changes. The std::string versions in the base
classes are still needed by downstream users, but will be removed
eventually.
Bug: webrtc:13579
Change-Id: Id757a07380f0518edf407ff5d0644511eb1e53d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265980
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37349}
This is the first step of migrating SupportsProtocol() to
absl::string_view. The std::string version will be removed once all
downstream users have migrated and have implemented the
absl::string_view version.
Bug: webrtc:13579
Change-Id: Ib609b9bab0c2e525553daddb1e365050bbe1c1f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265806
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37211}
This is just to reduce confusion since StunMessage and StunRequest
instances are frequently used together and message objects are often
configured from within request objects (which makes the name confusing).
Bug: none
Change-Id: I8bf5e774a5149239dd3023817614d411633bf583
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258484
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36533}
- Usage of these sigslots are removed in previous changes in WebRTC
and downstream repositories.
- Remove one more usage of the variables in port_unnittests.
No-Try: True
Bug: webrtc:11943
Change-Id: Ia424f598248a5d9a0cf88f041641a3dd8aa6effe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206500
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33205}
- During the process had to change port_interface sigslot usage and
async_packet_socket sigslot usage.
- Left the old code until down stream projects are modified.
Change-Id: I59149b0bb982bacd4b57fdda51df656a54fe9e68
Bug: webrtc:11943
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191520
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Lahiru Ginnaliya Gamathige <glahiru@webrtc.org>
Commit-Queue: Lahiru Ginnaliya Gamathige <glahiru@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33167}
This patch moves the SendBindingResponse from Port
to Connection. This is a behavioural NOP, and I don't
understand why it was in Port in the firs place!
Found when working on GOOG_PING.
BUG=webrtc:11100
Change-Id: I0466c5381f08ec4926ca3380e6914f0bc0dfcf63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161081
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29963}