mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
1. Supports payload received ack sync for sender
2. Supports safe-to-disconnect check (no auto reconnect or auto resume transfer yet) PiperOrigin-RevId: 517191691
This commit is contained in:
@@ -125,6 +125,7 @@ message ConnectionResponseFrame {
|
||||
// means bt supports multiplex while 0x00 means not. Refer to ClientProxy.java
|
||||
// for the bit usages.
|
||||
optional int32 multiplex_socket_bitmask = 5;
|
||||
optional int32 nearby_connections_version = 6;
|
||||
}
|
||||
|
||||
message PayloadTransferFrame {
|
||||
@@ -165,6 +166,7 @@ message PayloadTransferFrame {
|
||||
UNKNOWN_EVENT_TYPE = 0;
|
||||
PAYLOAD_ERROR = 1;
|
||||
PAYLOAD_CANCELED = 2;
|
||||
PAYLOAD_RECEIVED_ACK = 3;
|
||||
}
|
||||
|
||||
optional EventType event = 1;
|
||||
@@ -296,7 +298,12 @@ message KeepAliveFrame {
|
||||
// in other situations to trigger a faster disconnection event than waiting for
|
||||
// socket closed on the remote side.
|
||||
message DisconnectionFrame {
|
||||
// Empty on purpose.
|
||||
// Apply safe-to-disconnect protocol if true.
|
||||
optional bool request_safe_to_disconnect = 1;
|
||||
|
||||
// Ack of receiving Disconnection frame will be sent to the sender
|
||||
// frame.
|
||||
optional bool ack_safe_to_disconnect = 2;
|
||||
}
|
||||
|
||||
// A paired key encryption packet sent between devices, contains signed data.
|
||||
|
||||
@@ -205,6 +205,12 @@ enum PayloadStatus {
|
||||
|
||||
// The connection not encrypted yet.
|
||||
ENDPOINT_UNENCRYPTED = 9;
|
||||
|
||||
// The payload was stopped by the local client disconnection.
|
||||
LOCAL_CLIENT_DISCONNECTION = 10;
|
||||
|
||||
// The payload was stopped by the remote client disconnection.
|
||||
REMOTE_CLIENT_DISCONNECTION = 11;
|
||||
}
|
||||
|
||||
// The bandwidth of the mediums.
|
||||
|
||||
Reference in New Issue
Block a user