NearbyLoom

constructor(api: NearbyApi, serviceId: String = DEFAULT_SERVICE_ID, policy: DeliveryPolicy = DeliveryPolicy.Reliable, handshakeTimeout: Duration = DEFAULT_HANDSHAKE_TIMEOUT, maxChunkPayload: Int = ChunkCodec.MAX_CHUNK_PAYLOAD)

Parameters

api

NearbyApi to use (real GMS or fake for tests).

serviceId

Nearby Connections service ID. Must match on both devices.

policy

Delivery policy for every woven seam's inbound buffer.

handshakeTimeout

Ceiling on ONE connection's handshake, forwarded to ConnectStateMachine. Not a weave timeout — endpoint discovery sits outside it (see DEFAULT_HANDSHAKE_TIMEOUT).

maxChunkPayload

Per-chunk payload cap forwarded to ChunkCodec.