MCPcopy
hub / github.com/grpc/grpc-go / handlePing

Method handlePing

internal/transport/http2_client.go:1348–1359  ·  view source on GitHub ↗
(f *http2.PingFrame)

Source from the content-addressed store, hash-verified

1346}
1347
1348func (t *http2Client) handlePing(f *http2.PingFrame) {
1349 if f.IsAck() {
1350 // Maybe it's a BDP ping.
1351 if t.bdpEst != nil {
1352 t.bdpEst.calculate(f.Data)
1353 }
1354 return
1355 }
1356 pingAck := &ping{ack: true}
1357 copy(pingAck.data[:], f.Data[:])
1358 t.controlBuf.put(pingAck)
1359}
1360
1361func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) error {
1362 t.mu.Lock()

Callers 1

readerMethod · 0.95

Calls 2

calculateMethod · 0.80
putMethod · 0.45

Tested by

no test coverage detected