Commit graph

65 commits

Author SHA1 Message Date
Oscar Mira
40ce6b1f05
Revert "Remove unused+unmaintained PROXY_HTTPS code."
This reverts commit 81be7b2394.
2024-11-20 14:00:46 +01:00
Oscar Mira
e2d0b769f9
Revert "Remove more ProxyInfo references."
This reverts commit db6767dd0c.
2024-11-20 14:00:45 +01:00
Jim Gustafson
9280d4e8f0 Merge remote-tracking branch 'upstream/branch-heads/6723' 2024-10-17 09:03:43 -07:00
Richard Russo
bc875d82f3
Allow connection to a TCP+TLS server candidate 2024-09-11 11:18:48 -07:00
Adel Lahlou
2888424bfd Merge remote-tracking branch 'upstream/branch-heads/6613' into 6613-testing 2024-08-31 02:18:43 -07:00
Per K
6db0db5cfd Ensure TCPPort is notified of sent packets after reconnect
This fix an issue where the socket does not notify the port of sent packets after that the TCPConnection has opened a new socket. TcpConnection will open a new socket if the TCP  connection has been closed.

Bug: webrtc:361124449 b/359989715
Change-Id: Id33c5fc5292ee7d1c2d1cad6c373e2d4355d4fe1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360260
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42865}
2024-08-27 12:29:52 +00:00
Jim Gustafson
49c96f3e79 Merge remote-tracking branch 'google/branch-heads/6478' 2024-06-21 16:31:45 -07:00
Jim Gustafson
c43adafcd5 Merge m123/6312 2024-06-12 22:25:35 -07:00
Philipp Hancke
833ec4d123 Make Port constructor take a CreatePortArgs argument
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}
2024-05-17 15:39:47 +00:00
Tommi
db6767dd0c Remove more ProxyInfo references.
This removes many references to the unsupported ProxyInfo struct
but leaves temporary implementations for methods while downstream
code gets updated.

Bug: none
Change-Id: Iab4410b362a8296b2e00cf71080010e515f9f4ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344660
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42096}
2024-04-17 11:55:00 +00:00
Tommi
81be7b2394 Remove unused+unmaintained PROXY_HTTPS code.
Bug: none
Change-Id: I09cfe14c2990d25343fd06a6d3bde7d651d7d46c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342041
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41966}
2024-03-26 10:25:42 +00:00
Tomas Gunnarsson
0242939296 Reland "Deprecate old constructors and set_type() in Candidate and Port"
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}
2024-03-08 20:39:59 +00:00
Ilya Nikolaevskiy
ed8390d21a 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}
2024-03-07 09:43:38 +00:00
Tommi
aaa6851d53 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}
2024-03-06 18:36:14 +00:00
Jim Gustafson
c37ca3fc86 Merge branch m122 2024-02-14 22:44:28 -08:00
Tommi
698b4e7087 Update more Candidate type checkers to use Candidate::is_*
This is a follow up to a previous CL that removed direct dependency on
the `cricket::` string globals.

Bug: none
Change-Id: I4d839a36739fc4694ce81b72ee036e83dae580df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335420
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41623}
2024-01-26 13:41:09 +00:00
Harald Alvestrand
24510d43dc Delete deprecated AsyncResolver and related classes
To be submitted after downstream usage has been removed, but no earlier than December 1, 2023.

Bug: webrtc:12598
Change-Id: Id9acbac591c48c0c5883fe8f06cf6a68471b70f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323004
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41290}
2023-11-30 15:36:55 +00:00
Per K
c09cc4f961 rtc::Port use Socket::RegisterReceivedPacketCallback
Change Stun, Turn, TCP and UDP  ports to use Socket::RegisterReceivedPacketCallback and be notified of received packets using the rtc::ReceivedPacket class.


Change-Id: I7eba2ffdd83ae6f6181f765474aab7c57ff25507
Bug: webrtc:15368, webrtc:11943
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327941
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@google.com>
Cr-Commit-Position: refs/heads/main@{#41195}
2023-11-20 13:29:09 +00:00
Per K
698e0bec17 Add Connection::OnReadPacket(const rtc::PacketReceived&)
Deprecate old version but keep it for the time being.

Bug: webrtc:15368
Change-Id: Icbd2078a00d877ff948a2441c2027a12c85d4f2e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326104
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41112}
2023-11-09 09:15:02 +00:00
inaqui-signal
fa4fd71354 Merge branch 'm118' 2023-11-07 15:00:28 -06:00
Tommi
2afd284016 Rename [Un]SubscribeClose event subscription methods for clarity.
This is following up on a discussion here:
https://webrtc-review.googlesource.com/c/src/+/318061

Bug: none
Change-Id: Idb572ca6d0aad8d791eb6ba80dc0f48292f9f244
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318883
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40698}
2023-09-05 10:07:30 +00:00
Tommi
cbaf91bcf0 Disconnect signals when destroying socket
Add thread checks to TcpPort code

Bug: chromium:1478154
Change-Id: I045106c552dfcd8a8ab79218a59873fdc1d4326f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318061
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40693}
2023-09-05 07:02:24 +00:00
Harald Alvestrand
aa7d2f3b20 More unused sigslot includes
This time, hit the BUILD files too (where possible).

Bug: webrtc:11943
Change-Id: Ic8f2d77e1ba66f740efe0ef73b1ea6051356dedc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318100
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40654}
2023-08-29 12:20:44 +00:00
Rashad Sookram
2e9c66e1b1 Finish resolving merge conflicts 2022-11-11 19:10:59 -05:00
Rashad Sookram
bd151651d3 Merge in M108 2022-11-11 17:02:35 -05:00
Rashad Sookram
9ed4194e49
Update to 5005 (M102) (#86) 2022-08-24 11:07:33 -04:00
Danil Chapovalov
34f6d1c06d Migrate cricket::Port asynchronous calls to TaskQueueBase interface
Bug: webrtc:9702
Change-Id: I13e05ced190ca64a217961d74ee92dd9c15ed8ce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271641
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37849}
2022-08-19 21:35:47 +00:00
Tommi
9095e0e469 [TCPConnection] Check for valid port_ in OnClose and OnConnect.
Bug: chromium:1341261, chromium:1316996
Change-Id: I10931e731d2228f13f2df15419a8649e3e726cf0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268860
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37558}
2022-07-19 15:56:43 +00:00
Danil Chapovalov
7b19036b80 Migrate p2p/ to absl::AnyInvocable based TaskQueueBase interface
Bug: webrtc:14245
Change-Id: Iade96b4499e45401491c3eee941fafa51fb2849b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268147
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37482}
2022-07-07 13:03:44 +00:00
Ali Tofigh
de2ac5a6f3 Adopt absl::string_view in p2p/
Bug: webrtc:13579
Change-Id: Ia33afa2a9ad12d1a586087d49f581a93fddb565d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262766
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37381}
2022-06-30 13:19:18 +00:00
Ali Tofigh
58ecd42deb Remove std::string version of some functions that are no longer needed.
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}
2022-06-28 09:06:02 +00:00
Artem Titov
c374d11fac Move to_queued_task.h and pending_task_safety_flag.h into public API
Bug: b/235812579
Change-Id: I9fa3dc4a65044df8b44fff4e9bfeac7233fa381c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266080
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37248}
2022-06-17 09:20:39 +00:00
Ali Tofigh
ea5a944921 Add absl::string_view version of PortInterface::SupportsProtocol()
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}
2022-06-14 15:01:12 +00:00
Tommi
6fd77f3d3f Reland "Make deletion of Connection objects more deterministic."
This reverts commit 869c87a2b9.

Reason for revert: Re-landing

Original change's description:
> Revert "Make deletion of Connection objects more deterministic."
>
> This reverts commit 942cac2e9e.
>
> Reason for revert: Reverting while downstream updates are made.
>
> Original change's description:
> > Make deletion of Connection objects more deterministic.
> >
> > This changes most deletion paths of Connection objects to go through
> > the owner class of the Connection instances, Port.
> >
> > In situations where Connection objects still need to be deleted
> > asynchronously, `async = true` can be passed to
> > `Port::DestroyConnection` and get the same behavior as
> > `Connection::Destroy` formerly gave.
> >
> > The `Destroy()` method still exists for downstream compatibility, but
> > instead of deleting connection objects asynchronously, the deletion
> > now happens synchronously via the Port class.
> >
> > Bug: webrtc:13892, webrtc:13865
> > Change-Id: I07edb7bb5e5d93b33542581b4b09def548de9e12
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259826
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#36676}
>
> Bug: webrtc:13892, webrtc:13865
> Change-Id: I37a15692c8201716402ba5c10f249e4d3754ce4c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260862
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36736}

Bug: webrtc:13892, webrtc:13865
Change-Id: I29da6c8899d8550c26ccecbbd0fe5f5556c80212
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260943
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37171}
2022-06-10 06:06:05 +00:00
Tommi
c85e473740 [Connection] Remove friend clause for ConnectionRequest
* Switch to StunRequest where ConnectionRequest isn't needed.
* Move ConnectionRequest into Connection as a subclass
* Move declaration+implementation into the .cc file.

Bug: none
Change-Id: I1591a91d8e13a0db9f89cfbba0fbc9478a55b789
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264150
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37036}
2022-05-30 10:34:23 +00:00
Tommi
1043fcd433 [TCPConnection] Avoid dereferencing port() in OnClose().
Avoid de-referencing possibly gone port when posting tasks. Instead
use the network_thread() accessor for accessing the thread pointer.

Also including a safety check in OnClose callback as an extra check.

Bug: chromium:1316996
Change-Id: I8fa2c7b526a9db953f50bbbabb3e4b2fcef8221a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263900
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37013}
2022-05-27 07:11:54 +00:00
Tomas Gunnarsson
869c87a2b9 Revert "Make deletion of Connection objects more deterministic."
This reverts commit 942cac2e9e.

Reason for revert: Reverting while downstream updates are made.

Original change's description:
> Make deletion of Connection objects more deterministic.
>
> This changes most deletion paths of Connection objects to go through
> the owner class of the Connection instances, Port.
>
> In situations where Connection objects still need to be deleted
> asynchronously, `async = true` can be passed to
> `Port::DestroyConnection` and get the same behavior as
> `Connection::Destroy` formerly gave.
>
> The `Destroy()` method still exists for downstream compatibility, but
> instead of deleting connection objects asynchronously, the deletion
> now happens synchronously via the Port class.
>
> Bug: webrtc:13892, webrtc:13865
> Change-Id: I07edb7bb5e5d93b33542581b4b09def548de9e12
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259826
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36676}

Bug: webrtc:13892, webrtc:13865
Change-Id: I37a15692c8201716402ba5c10f249e4d3754ce4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260862
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36736}
2022-05-02 20:41:39 +00:00
Tommi
942cac2e9e Make deletion of Connection objects more deterministic.
This changes most deletion paths of Connection objects to go through
the owner class of the Connection instances, Port.

In situations where Connection objects still need to be deleted
asynchronously, `async = true` can be passed to
`Port::DestroyConnection` and get the same behavior as
`Connection::Destroy` formerly gave.

The `Destroy()` method still exists for downstream compatibility, but
instead of deleting connection objects asynchronously, the deletion
now happens synchronously via the Port class.

Bug: webrtc:13892, webrtc:13865
Change-Id: I07edb7bb5e5d93b33542581b4b09def548de9e12
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259826
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36676}
2022-04-27 21:52:31 +00:00
Peter Thatcher
4a2e0e5d45
Update to 4896 (M100) (#72) 2022-04-15 17:13:23 -06:00
Tomas Gunnarsson
f15189dbce [CallbackList] Use CallbackList in AsyncPacketSocket for close events.
This removes use of the SignalClose sigslot. This CL includes thread
checks for the callback list and updates some call sites to unsubscribe
from events before deletion or detaching from a socket instance.

Bug: webrtc:11943
Change-Id: Ib66d39aa5cc795b750c9e3eaa85ed6af8b55b2b5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258561
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36540}
2022-04-13 14:56:58 +00:00
Tommi
d7e5cfb3cf Use WeakPtr<Port> in Connection classes.
This is to aid with catching issues whereby a connection object might
have a bad reference back to a port object, e.g. inside of an async
callback.

Bug: webrtc:13892
Change-Id: I56503fedc2865919713b10f236ce023554c68ded
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257164
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36394}
2022-03-31 12:44:02 +00:00
Jonas Oreland
e62c2f2c77 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf
rename WebRtcKeyValueConfig to FieldTrialsView

Bug: webrtc:10335
Change-Id: If725bd498c4c3daf144bee638230fa089fdde833
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256965
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36365}
2022-03-29 10:14:00 +00:00
Jonas Oreland
c06fe8b04e WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 11/inf
convert rtc_base/network and collateral.

This also remove last usage of system_wrappers/field_trials
in p2p/...Yay!

Bug: webrtc:10335
Change-Id: Ie8507b1f52bf7f3067e9b4bf8c81a825e4644fda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256640
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36357}
2022-03-28 15:48:01 +00:00
Niels Möller
e0c6bdf071 Use const rtc::Network* in ports and port allocator
No-try: True
Bug: webrtc:13869
Change-Id: I6004fa96278263d0d25a1446d7bb8de41a563433
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256682
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@google.com>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36353}
2022-03-28 12:48:30 +00:00
Mirko Bonadei
0cb1cfa69e Reland "Removing MessageHandler dependency from Connection."
This reverts commit 05ea12e513.

Reason for revert: Speculative revert.

Original change's description:
> Revert "Removing MessageHandler dependency from Connection."
>
> This reverts commit 3202e29f72.
>
> Reason for revert: Introduced a crash in the task posted by Destroy()
>
> Original change's description:
> > Removing MessageHandler dependency from Connection.
> >
> > Bug: webrtc:11988
> > Change-Id: Ic35bb5baeafbda7210012dceb0d6d5f5b3eb95c9
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249941
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#35890}
>
> No-Try: True
> Bug: webrtc:11988
> Change-Id: Ie70ee145fde75b8cf76b02784176970e7a78e001
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252541
> Auto-Submit: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36078}

No-Try: True
Bug: webrtc:11988
Change-Id: Idfd42d016e81d4352839c33dcb4ea3b0dafea08b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252584
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36081}
2022-02-25 11:01:54 +00:00
Taylor Brandstetter
05ea12e513 Revert "Removing MessageHandler dependency from Connection."
This reverts commit 3202e29f72.

Reason for revert: Introduced a crash in the task posted by Destroy()

Original change's description:
> Removing MessageHandler dependency from Connection.
>
> Bug: webrtc:11988
> Change-Id: Ic35bb5baeafbda7210012dceb0d6d5f5b3eb95c9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249941
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35890}

No-Try: True
Bug: webrtc:11988
Change-Id: Ie70ee145fde75b8cf76b02784176970e7a78e001
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252541
Auto-Submit: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36078}
2022-02-25 10:41:13 +00:00
Tommi
3202e29f72 Removing MessageHandler dependency from Connection.
Bug: webrtc:11988
Change-Id: Ic35bb5baeafbda7210012dceb0d6d5f5b3eb95c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249941
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35890}
2022-02-02 16:32:20 +00:00
Niels Möller
646fddc3c9 Fix TCPPort::SetOption to apply options to the accepted sockets
The AsyncListenSocket::SetOption method then gets unused, and can be
deleted.

Bug: webrtc:13065
Change-Id: Idcf70a75b96036290fdceff6e0f96a8d5617f87f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236580
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35302}
2021-11-03 11:02:46 +00:00
Niels Möller
d30ece1804 Reland "Take out listen support from AsyncPacketSocket"
This is a reland of b141c162ee

Original change's description:
> Take out listen support from AsyncPacketSocket
>
> Moved to new interface class AsyncListenSocket.
>
> Bug: webrtc:13065
> Change-Id: Ib96ce154ba19979360ecd8144981d947ff5b8b18
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232607
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35234}

Bug: webrtc:13065
Change-Id: I88bebdd80ebe6bcf6ac635023924d79fbfb76813
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235960
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35260}
2021-10-25 08:26:56 +00:00
Evan Shrubsole
1f30c2ba9b Revert "Take out listen support from AsyncPacketSocket"
This reverts commit b141c162ee.

Reason for revert: Breaking WebRTC rolls. See https://ci.chromium.org/ui/b/8832847811929676465 for an example failed build.

Original change's description:
> Take out listen support from AsyncPacketSocket
>
> Moved to new interface class AsyncListenSocket.
>
> Bug: webrtc:13065
> Change-Id: Ib96ce154ba19979360ecd8144981d947ff5b8b18
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232607
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35234}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:13065
Change-Id: Id5d5b35cb21704ca4e3006caf1636906df062609
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235824
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35249}
2021-10-20 15:52:03 +00:00