ProvidePeerInfo
Request Overview
This packet is automatically sent to other devices when they are discovered. This includes both when a device is discovered using traditional discovery protocols and when a device is discovered because a request was received.
Headers
call_type | int |
1 |
packet_type | long |
((1L << 32) |
sequence | long | |
sender_uuid | String | |
connect_back | String | |
peer | JSONArray |
Body
The body of this request is empty.
Custom Objects
Peer
The peer JSONObject has the following definition:
{
"profile": {
"custom_key": "custom_value",
"custom_key2": "custom_value2"
},
"spaces": [
{"space_uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"title": "An optional Shared Space title"},
{"space_uuid": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
"title": "Another optional title"}
]
}
Example
An example of the peer element of the initial ProvidePeerInfo packet sent is:
[
{
"mimetype": "application/json",
"op": "add",
"path": "/profile",
"data": {
"displayName": "John's iPhone"
}
},
{
"mimetype": "application/json",
"op": "add",
"path": "/spaces",
"data": [
{"space_uuid": "5ba3ecc1-56f0-43df-adeb-20f34979da9e",
"title": "John and Kelly's Game"},
{"space_uuid": "2691f62e-8949-4225-97d5-3b9f5eb9efb8",
"title": "Bill and John's Game"}
]
}
]
An example of the peer element when a new space is deleted is:
[
{
"mimetype": "application/json",
"op": "del",
"path": "/spaces",
"data": [
{"space_uuid": "2691f62e-8949-4225-97d5-3b9f5eb9efb8"}
]
}
]