Update TransportClient

akwizgran
2018-03-22 13:16:46 +00:00
parent 3f0da4dbfe
commit 2524f29c08
2 changed files with 29 additions and 26 deletions

@@ -0,0 +1,29 @@
The transport properties client is a [BSP client](BSP) that synchronises transport properties between pairs of devices. Transport properties describe how to connect to a device over various transports.
### Group identifiers
The client's identifier is `org.briarproject.bramble.transport`.
The client uses a separate group for each pair of contacts. The [group descriptor](BSP#group-identifiers) is a [BDF list](BDF) containing the unique IDs of the contacts' identities, sorted in ascending order as byte strings.
The client also uses a group with an empty descriptor for storing local transport properties. This group is not shared with any contacts.
### Message types
**UPDATE** - The message body is a BDF list with three elements: `transportId` (string), `version` (int), and `properties` (dictionary). `transportId` and `properties` are supplied by the transport plugin. `version` is incremented whenever the properties change.
### Validity policy
* An update is valid if it is well-formed.
### Storage policy
* In the groups shared with contacts:
* For each transport, the local message with the highest version is stored.
* For each transport, the remote message with the highest version is stored.
* In the unshared group, the local message with the highest version is stored.
### Sharing policy
* In the groups shared with contacts, all local messages are shared.
* In the unshared group, no messages are shared.

@@ -1,26 +0,0 @@
TransportClient is a [BSP client](BSP) that synchronises transport properties between devices. Transport properties describe how to connect to a device over various transports.
### Group identifiers
TransportClient uses the following client identifer:
`673e a091 6735 61e2 8f70 122f 6a8e a8f4 97c3 624b 86fa 07f7 85bb 15f0 9fb8 7b4b`
The client uses a separate group for each pair of contacts. The [group descriptor](BSP#group-identifiers) is a [BDF list](BDF) containing the unique IDs of the contacts' identities, sorted in ascending order as byte strings.
### Message types
**0: UPDATE** - The content is a BDF list with three elements: `transport_id` (string), `properties` (dictionary), and `version` (int). `transport_id` and `properties` are supplied by the transport plugin. `version` is incremented whenever the properties change.
### Validity policy
* An update is valid if it is well-formed.
### Storage policy
* For each transport, the local message with the highest version is stored.
* For each transport, the remote message with the highest version is stored.
### Sharing policy
* All local messages are shared.
* All remote messages are shared.