MCPcopy Create free account
hub / github.com/grpc/grpc-java / convertHeaders

Method convertHeaders

netty/src/main/java/io/grpc/netty/Utils.java:193–199  ·  view source on GitHub ↗
(Http2Headers http2Headers)

Source from the content-addressed store, hash-verified

191 }
192
193 public static Metadata convertHeaders(Http2Headers http2Headers) {
194 if (http2Headers instanceof GrpcHttp2InboundHeaders) {
195 GrpcHttp2InboundHeaders h = (GrpcHttp2InboundHeaders) http2Headers;
196 return InternalMetadata.newMetadata(h.numHeaders(), h.namesAndValues());
197 }
198 return InternalMetadata.newMetadata(convertHeadersToArray(http2Headers));
199 }
200
201 public static int getH2HeadersSize(Http2Headers http2Headers) {
202 if (http2Headers instanceof GrpcHttp2InboundHeaders) {

Callers 5

serverHandlerMethod · 0.95
clientHandlerMethod · 0.95
onHeadersReadMethod · 0.95

Calls 4

newMetadataMethod · 0.95
numHeadersMethod · 0.95
namesAndValuesMethod · 0.95
convertHeadersToArrayMethod · 0.95

Tested by 1