Archived
3
0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues or pull requests.
libipc-old/README.markdown

42 lines
1.3 KiB
Markdown
Raw Normal View History

2016-05-26 18:27:59 +02:00
# connection init (draft)
2016-09-13 21:56:39 +02:00
## how things happen
2016-05-26 18:27:59 +02:00
2016-12-14 22:29:36 +01:00
* Service: daemon providing a feature (windowing, audio, pubsub, …)
* Application: specific application (browser, instant messaging, …)
2016-05-26 18:47:28 +02:00
2016-12-14 22:29:36 +01:00
* service: service name
* index: process index (to launch a service several times)
* version: service version
2016-05-26 18:47:28 +02:00
2016-12-14 22:29:36 +01:00
1. Service creates a unix socket /tmp/service-index-version.sock
2. Application connects to /tmp/service-index-version.sock
2016-05-26 18:27:59 +02:00
2016-12-14 22:29:36 +01:00
## pure "networking" view (what should go in the sockets)
2016-05-26 18:27:59 +02:00
2016-12-14 22:29:36 +01:00
1. Application connects to /tmp/service-index-version.sock
1. Service acknowledges (empty message)
2016-05-26 18:27:59 +02:00
# messages format
2016-12-14 22:29:36 +01:00
In order to communicate between the application and the service, we use the Type-Length-Value format.
2016-09-13 21:56:39 +02:00
This will be used with some conventions.
2016-05-26 18:27:59 +02:00
2016-12-14 22:29:36 +01:00
## programming, debug
2016-09-15 23:08:08 +02:00
2016-05-26 18:27:59 +02:00
## overview
2016-09-13 21:56:39 +02:00
The format will be "type : value".
2016-05-26 18:27:59 +02:00
2016-09-13 21:56:39 +02:00
The type will be a simple byte :
2016-05-26 18:27:59 +02:00
2016-05-26 18:47:28 +02:00
* <0 - 15> : control, meta data
* <16 - 127> : later use
* <128 - 255> : application specific (windowing system, audio system, …)
2016-05-26 18:27:59 +02:00
2016-09-13 21:56:39 +02:00
index | abbreviation | semantic
0 | close | to close the communication between the application and the service
2016-09-15 23:08:08 +02:00
1 | message | to send data
2 | error | to send an error message
2016-12-14 22:29:36 +01:00
3 | ack | to send an acknowledgment