"id": "",
"action": "registerWebClient",
"payload": {
"pageName": "",
"pageHash": "",
"sessionID": ""
}
Request:
"id": "{correlation-id}", // request/response correlation ID
"action": "registerHostClient",
"payload": {
"hostClientID": "", // set if re-connecting to the same host client
"pageName": "",
"isApp": true,
"update": true, // the page should be updated; otherwise it's cleaned
"authToken": "",
"permissions": ""
}
Response:
"id": "{correlation-id}",
"action": "",
"payload": {
"hostClientID": "", // generated on first connect if not set
"sessionID": "0", // always "0"
"pageName": "", // parsed/normalized page full name
"error": "" // set if there was an error registering host agent
}
The message is sent to a host client when a new app session is started.
"id": "", // always empty
"action": "sessionCreated",
"payload": {
"pageName": "",
"sessionID": ""
}
Request from a host client:
"id": "{correlation-id}",
"action": "pageCommandFromHost",
"payload": {
"pageName": "",
"sessionID": "",
"command": {
"indent": 0,
"name": "add" // mandatory command name
"values": ["value_1", "value_2", ...],
"attrs": {
"attr_1": "value_1",
"attr_2": "value_2",
...
},
"lines": ["line1", ...],
"commands": [
// sub-commands
]
}
}
Response:
"id": "{correlation-id}",
"action": "",
"payload": {
"result": "", // control property value or space-delimited IDs of newly added controls
"error": ""
}
Request from a host client:
"id": "{correlation-id}",
"action": "pageCommandsBatchFromHost",
"payload": {
"pageName": "",
"sessionID": "",
"commands": [
{
"indent": 0,
"name": "add"
"values": ["value_1", "value_2", ...],
"attrs": {
"attr_1": "value_1",
"attr_2": "value_2",
...
}
"lines": ["line1", ...],
"commands": [
// sub-commands
]
},
...
]
}
Response:
"id": "{correlation-id}",
"action": "",
"payload": {
"results": ["", "", ...],
"error": ""
}
One-way message from a host to Flet server:
"id": "",
"action": "inactiveAppFromHost",
"payload": {
"pageName": ""
}
One-way message from Flet server to a host:
"id": "",
"action": "pageEventToHost",
"payload": {
"pageName": "",
"sessionID": "",
"eventTarget": "",
"eventName": "",
"eventData": ""
}