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

Method dropProtectedIfEmtpy

credentials/alts/internal/conn/record.go:299–310  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

297}
298
299func (p *conn) dropProtectedIfEmtpy() {
300 if len(p.buf) > 0 || len(p.nextFrame) > 0 {
301 return
302 }
303 // Potentially idle connection, release the read buffer.
304 p.nextFrame = nil
305 p.buf = nil
306 if p.protectedHandle != nil {
307 readBufPool.Put(p.protectedHandle)
308 p.protectedHandle = nil
309 }
310}
311
312// Write encrypts, frames, and writes bytes from b to the underlying connection.
313func (p *conn) Write(b []byte) (n int, err error) {

Callers 1

ReadOnReadyMethod · 0.95

Calls 1

PutMethod · 0.65

Tested by

no test coverage detected