You can find the relevant part of the protocol specification doc you linked
to by looking for "Length-Prefixed-Message". The sequence of DATA frames is
treated as a byte stream containing one or more of
those Length-Prefixed-Message. Then each message is arbitrary binary data.
If it is a protobuf message then it can be decoded as usual with protobuf.
The stream decoder implementation
<https://github.com/grpc/grpc-node/blob/master/packages/grpc-js/src/stream-decoder.ts>
in
the JavaScript library might help understand this. That function handles a
single DATA frame at a time.

On Wed, Jun 19, 2019 at 2:35 PM <[email protected]> wrote:

> Hi All,
>
> Given a stream of raw HTTP2 traffic between a gRPC server and client, how
> to extract the protobufs?
>
> We were following gRPC over HTTP2
> <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>. We are
> stuck in how to extract the encoded protobuf binary string from the HTTP2
> DATA frame. And the spec does not go into more details about the format of
> how protobuf binary strings are encoded in DATA frames.
>
> We were trying to read the gRPC source code <https://github.com/grpc/grpc>
> to figure out the protocol, but could not identify the right APIs.
>
> Why? We are sort of reverse-engineering the gRPC protocol. And try to
> extract the traffic outside of the gRPC server and client, and convert them
> back into protobufs.
>
> Any pointers on docs that explain the format, or to the APIs inside gRPC
> source code would be highly appreciated.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/d1538cca-a204-4655-a142-67a2a45e053d%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/d1538cca-a204-4655-a142-67a2a45e053d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAPK2-4fnjnWOU3Np0WXkCMJK59OVdZ6p%3Dk13N1w5zEA7nKEY9Q%40mail.gmail.com.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to