Esc

Call

structextensionsince 0.36.1Source
  • macOS: Call works on macOS
  • Linux: Call works on Linux
  • Windows: Call works on Windows
  • Wasm: Call works on Wasm

Declaration

Call :: struct {
    state: *void;}

Opaque RPC handle. Join its sender and receiver before close; returned messages and statuses own independent storage.

Example
channel: Channel; // set transport.base_url and transport.tls before the first call
method := Method.{ path = "/echo.Echo/Say" };
call, status := open_call(*channel, method);
assert(status.code == .OK);
defer close(*call);
status = close_send(*call);
status = finish(*call);
defer free_status(*status);

See also