datagram@1
The first, lockstep datagram framing, also spelled datagram. A client sends
a request and reads its reply before sending the next, so frames carry no
kind byte and only the client starts a call.
| Frame | Bytes |
|---|---|
| request | call id (u16 LE), request id (u64 LE), arguments |
| reply | request id (u64 LE), envelope |
- The call id is the function's position in its protocol. Both ends
share it because
comline@1refuses a peer whose IR differs, so the profile statescalls = by_index. - With no kind byte and no protocol number, a connection carries one
protocol, called in one direction.
datagram@2adds both.
For example, a call to function 3, request id 42, with the JSON arguments
[7,"x"], and an ok reply to request 7:
Proven by the framing-datagram vectors in the runtime's
corpus.