How to know if a HTTP2 DATA frame contains an entire protobuf message or there will be more segments

28 views
Skip to first unread message

yihao yang

unread,
Apr 1, 2018, 8:53:14 PM4/1/18
to grpc.io
Hi, all:

The title is my question. In this spec, https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md.
The "requests" is a single stream. But how can I know a single request is over? Since a tcp frame is maximum 65535 bytes.
But a grpc protobuffer request can be much larger. If I have serveral requests to be sent on the stream. How can I distinguish the boundary of each request?

Thanks,
Yihao

Michael Lumish

unread,
Apr 2, 2018, 12:46:35 PM4/2/18
to yihao yang, grpc.io
The requests stream is a stream of Length-Prefixed-Message, and that length prefix tells you how much data to expect for each message.

--
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+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/26c3447c-4da4-4118-a29a-4169cbe6a906%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages