Commit Graph
20 Commits
Author SHA1 Message Date
Francis Tsui dacbd03aa1 Replace ByteArray with std::string.
PiperOrigin-RevId: 900893850
2026-04-16 13:52:02 -07:00
hai007 f112d9ff71 Change code to follow payload ack send/receive frame format change.
PiperOrigin-RevId: 601486151
2024-01-25 10:17:23 -08:00
Anay Wadhera b0ab83535f silly season
PiperOrigin-RevId: 572781177
2023-10-11 22:08:37 -07:00
hai007 55aedfb235 Implement Safe to Disconnect feature
PiperOrigin-RevId: 560119556
2023-08-25 09:51:44 -07:00
Janusz Sobczak 55194622a7 Migrate to AnyInvocable
PiperOrigin-RevId: 557660146
2023-08-16 18:13:11 -07:00
Janusz Sobczak 6d5eab04d3 Work around race condition during encryption setup
The sending party may finish setting up encryption and start
sending encrypted packets while the receiving party is still configuring
encryption and expecting unencrypted packets

PiperOrigin-RevId: 549267838
2023-07-19 03:47:10 -07:00
Guogang Li 86e39b004c Fixed the crash when handling keep alive packet
PiperOrigin-RevId: 542870226
2023-06-23 08:48:57 -07:00
Guogang Li 4e5d91b970 Fixed the crash when handling keep alive packet
PiperOrigin-RevId: 542592058
2023-06-22 10:05:46 -07:00
hai007 47aea4b689 Fix Tsan data race error
PiperOrigin-RevId: 533486198
2023-05-19 10:14:21 -07:00
Juliet Levesque 8a78212bb8 [Nearby Connections] Check for shutdown before accessing ClientProxy.
During the destruction of NearbyConnections, Core (which owns ClientProxy) is destructed before ServiceController (which owns EndpointManager), which means any pending tasks on the EndpointManager executor that use ClientProxy will be using
garbage memory. To fix this issue, EndpointManager::DiscardEndpoint will check
for an `is_shutdown` boolean set during ~EndpointManager before accessing
ClientProxy. The assumption is that any accessing of ClientProxy after the
destruction will be invalid.

PiperOrigin-RevId: 532581122
2023-05-16 14:54:20 -07:00
Edwin Wu 1e229e31c5 [Nearby Connections] Add OS_INFO for NC C++.
PiperOrigin-RevId: 509443158
2023-02-14 00:05:17 -08:00
Suet-Fei Li 084f7ebd88 Remove location namespace in third_party/nearby.
PiperOrigin-RevId: 500023196
2023-01-06 02:53:57 -08:00
hai007 c3c9a7ffc9 Extend endpoint disconnection timeout.
This extends the endpoint disconnection timeout to be slightly longer than the WebRTC connection attempt timeout. This allows an in-progress bandwidth upgrade to resolve before we clean up the endpoint.

Failing to properly clean up the bandwidth upgrade can lead to a delay when shutting down Nearby Connections and can crash the process instead of allowing a clean shutdown.

PiperOrigin-RevId: 496750001
2022-12-20 14:18:59 -08:00
hai007 255c2672ea Internal cleanup.
PiperOrigin-RevId: 495138142
2022-12-13 15:11:48 -08:00
hai007 82f35a1401 Add "PayloadDirection" as an extra index for a payload's ThroughputRecorder
PiperOrigin-RevId: 491516038
2022-11-28 20:48:52 -08:00
hai007 8f681dece0 Throughput profiling
PiperOrigin-RevId: 477752265
2022-09-29 10:02:11 -07:00
nohle 463d391fcd [Nearby Connections][C++] Track bandwidth upgrade mediums for each endpoint (1/4)
This CL should be a no-op.

Provide better access to the service ID during bandwidth upgrade handling. Notably, 1) have the endpoint channel store its associated service ID, and 2) send the service ID on a connect/disconnect.

The service ID identifies the application, for example, "NearbySharing". In future CLs, we will use the service IDs to better handle bandwidth-upgrade bookkeeping when multiple services are running simultaneously. Specifically, we will better handle reverting a bandwidth-upgrade medium without interfering with other services.

PiperOrigin-RevId: 442019209
2022-04-15 08:15:53 -07:00
jfcarroll f4b80ccb59 These are the changes for Payload::Type => PayloadType for the flattening CL
PiperOrigin-RevId: 436767666
2022-03-23 10:11:15 -07:00
suetfei 0e6620c970 Internal refactor to fix missing includes.
PiperOrigin-RevId: 427669790
2022-02-09 23:53:37 -08:00
hais f5fcd35ced nearby sdk refactor
PiperOrigin-RevId: 425434260
2022-02-02 11:56:39 -08:00