Decodes into owned Protobuf storage. Release a MESSAGE with Proto.free. .
Signature
receive :: (call: *Call, $T: Type) -> (value: T, kind: Receive_Kind)
P :: #import "Extensions/Protobuf";
Api :: #import "Extensions/Protobuf/Schema"(GRPC = true, TEXT = "syntax='proto3'; package echo; message Say { string text = 1; }");
main :: () {
channel: Channel;
call, status := open_call(*channel, Method.{ path = "/echo.Echo/Say" });
defer close(*call);
reply, kind := receive(*call, Api.echo.Say);
if kind == .MESSAGE {
print("%\n", reply.text);
P.free(*reply);
}
}