mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-05 19:28:02 +02:00
proto: give a rough protocol overview as part of the docs
This commit is contained in:
parent
4a3efa913a
commit
442ce1edb8
1 changed files with 23 additions and 0 deletions
|
|
@ -30,6 +30,29 @@
|
|||
</copyright>
|
||||
|
||||
<documentation>
|
||||
<chapter title="Protocol overview">
|
||||
The ei protocol has three components: objects, requests and events. It is
|
||||
designed to be connect two processes over a UNIX socket - an ei client and
|
||||
an EIS implementation (typically a Wayland compositor). The protocol
|
||||
is asynchronous and object-based.
|
||||
|
||||
Whenever a message (request or event) is sent, that message carries an
|
||||
identifier for the object. The type of an object is defined by its interface -
|
||||
the interfaces are detailed here in this protocol. Thus, when a message for an
|
||||
object arrives, the client or EIS implementation can invoke the corresponding
|
||||
function on the object.
|
||||
|
||||
An object has exactly one interface but there may be multiple objects with
|
||||
the same interface (e.g. multiple devices all use the ei_device interface).
|
||||
|
||||
Requests are messages sent from an ei client to an EIS implementation, events
|
||||
are messages sent from the EIS implementation to the client. This is the same
|
||||
nomenclature that the Wayland protocol uses.
|
||||
|
||||
The ei protocol is modelled closely after the Wayland protocol, but it is not
|
||||
binary compatible.
|
||||
</chapter>
|
||||
|
||||
<chapter title="Wire format">
|
||||
Protocol wire format: `[sender-id, length, opcode, ...]`
|
||||
Where:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue