DoorServer
The door's server: one door per user per host, on a local socket (trove-parts §TPD-1 to §TPD-3, §TPD-6).
| Inherits | QObject |
| Group | localdoor |
In the namespace octomy::localdoor. Declared in src/libs/liblocaldoor/localdoor/DoorServer.hpp.
Detailed description
The order of open() is kiln's, and it is the only safe order
The server takes the lock before it touches the socket. qhttp removes a socket file before it listens, and on Unix that also removes the socket of a live server (§TPD-12 defect 1). With the lock first, a second host stops at the lock and names the holder, and the live host keeps its socket. A lock whose PID is gone is stale, and QLockFile takes it.
The call
`POST /` with the `x-door-token` header and the OPAL envelope `{"task": …, "args": {…}, "caller": {"label": …, "folder": …}}`. The token is checked before the body is read: a caller without it learns nothing. A client that names a protocol in `x-door-protocol` other than kProtocolVersion gets 426, and the door never guesses. A body over kMaxBodyBytes gets 413. Every other answer comes from the ICallHandler.
See also octomy::localdoor::DoorClient, octomy::localdoor::ICallHandler.