DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
grpcweb.h File Reference

gRPC-Web message framing (DETWS_ENABLE_GRPC_WEB) - zero-heap length-prefixed frame builder + parser, the HTTP/1.1-reachable subset of gRPC that wraps the Protobuf codec (services/protobuf). gRPC proper needs HTTP/2; gRPC-Web rides the shipped HTTP/1.1 server/client. More...

#include "ServerConfig.h"

Go to the source code of this file.

Detailed Description

gRPC-Web message framing (DETWS_ENABLE_GRPC_WEB) - zero-heap length-prefixed frame builder + parser, the HTTP/1.1-reachable subset of gRPC that wraps the Protobuf codec (services/protobuf). gRPC proper needs HTTP/2; gRPC-Web rides the shipped HTTP/1.1 server/client.

Each gRPC / gRPC-Web message is a 5-octet prefix then the body:

[flags(1)][length(4, big-endian)][body...]
  • flags bit 0 = compressed (per the Message-Encoding header); bit 7 (0x80) marks a gRPC-Web trailers frame whose body is an HTTP/1.1-style trailer block (grpc-status:0\r\ngrpc-message:...\r\n) instead of a Protobuf message.
  • A response is zero or more message frames followed by exactly one trailers frame.

The message body is an encoded Protobuf message (build it with the protobuf codec, then frame it here). This is the framing layer only.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file grpcweb.h.