You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -55,6 +65,12 @@ Multi-peer `send(_:to:[peers])` is exhaustive, not atomic: it attempts every pee
55
65
and, if any fail, throws `PeerSendError` listing per-peer outcomes (which
56
66
succeeded, which failed) instead of aborting on the first failure.
57
67
68
+
`.error` carries a typed `PeerConnectivityErrorEvent` (operation, peer, and the
69
+
underlying error) so a failure can be attributed rather than surfaced as a bare
70
+
`Error`. Messages and resources use length-prefixed framing, so a truncated
71
+
inbound transfer surfaces as a typed error instead of a silently incomplete
72
+
payload, and inbound handlers apply an idle timeout.
73
+
58
74
Use `join(_:)` for discovered peers. It uses endpoints for direct-connect backends and invitations for nearby-session backends. Use `connect(to:)`, `invite(_:context:timeout:)`, and `openChannel(to:protocol:)` when backend-specific behavior is intentional.
59
75
60
76
`startBrowsing()` and `startAdvertising()` fail when the backend cannot control those roles separately. Use `start()` when the application intentionally wants the backend's complete configured lifecycle.
@@ -135,4 +151,6 @@ Use explicit factories so call sites choose the backend intentionally:
`appleNetworkLibP2P(configuration:)` is throwing. When `enableBonjour` is set, it requires at least one listen address to announce; otherwise it throws `PeerConnectivityError.listenAddressRequired` rather than advertising `.bonjourDiscovery` it cannot honor.
155
+
138
156
Automatic backend selection is intentionally omitted from the initial API surface.
0 commit comments