Declaration
Call_Options :: struct {
// Absolute monotonic milliseconds; zero means no RPC deadline. deadline_ms: s64; metadata: [] Metadata_Entry; max_message := 4 * 1024 * 1024; max_wire_message := 4 * 1024 * 1024; compression: Compression; max_metadata := 64 * 1024;}Per-call deadlines and message/metadata bounds. Client outgoing metadata is borrowed through open_call; server initial metadata is borrowed through serve_call.
options := Call_Options.{
deadline_ms = to_milliseconds(current_time_monotonic()) + 5000, // absolute, monotonic
metadata = Metadata_Entry.[.{ "x-request-id", "42" }],
compression = .GZIP,
};
channel: Channel;
call, status := open_call(*channel, Method.{ path = "/echo.Echo/Say" }, options);
defer close(*call);