You can define a oneof message that is one of header message or content message, and define your RPC as a stream of this oneof message type.
On Tuesday, April 15, 2025 at 1:33:15 PM UTC+5:30 Brad Taylor wrote: > Is it allowed to send and receive mixed messages in a stream? Treat iis I > have a proto file with two message, a header message and a content message. > I want my server to receive one header and a random amount of content > messages. It looks like the rpc directive only allows a single message > definition. I considered using repeated field, but that looks like it only > accepts a constant value at definition time, not a computed one at run > time. -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/grpc-io/8aa20fc5-4eb4-43d9-932d-c66133f43218n%40googlegroups.com.