Binary wire serialization for RPC payloads.
The OLLMrpc.Bin namespace encodes and decodes Serializable GObjects on a per-connection Stream. Type aliases are process-wide ( register); property keys are JIT tokens on each Stream. Json converts between JSON trees and bin bytes for tests and HTTP tooling. Wire layout is documented in docs/bin-rpc-protocol.md.
OLLMrpc.Bin.register("Pair", typeof(Pair));
var mem = new GLib.MemoryOutputStream.resizable();
var out_stream = new GLib.DataOutputStream(mem);
var write_bin = new OLLMrpc.Bin.Stream(null, out_stream);
write_bin.write(new Pair() { name = "alpha", count = 42 });
out_stream.close();
var read_bin = new OLLMrpc.Bin.Stream(
new GLib.DataInputStream(
new GLib.MemoryInputStream.from_bytes(mem.steal_as_bytes())),
null);
var parsed = read_bin.parse() as Pair;
var json = new OLLMrpc.Bin.Json();
var node = json.from_gobject(pair);
2. One Stream per connection for the channel lifetime
3. Implement Serializable; override only non-scalar props
4. Prefer Json.from_gobject over hand-rolled memory pipes