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

Method Close

internal/transport/client_stream.go:101–111  ·  view source on GitHub ↗

Close closes the stream and propagates err to any readers.

(err error)

Source from the content-addressed store, hash-verified

99
100// Close closes the stream and propagates err to any readers.
101func (s *ClientStream) Close(err error) {
102 var (
103 rst bool
104 rstCode http2.ErrCode
105 )
106 if err != nil {
107 rst = true
108 rstCode = http2.ErrCodeCancel
109 }
110 s.ct.closeStream(s, err, rst, rstCode, status.Convert(err), nil, false)
111}
112
113// Write writes the hdr and data bytes to the output stream.
114func (s *ClientStream) Write(hdr []byte, data mem.BufferSlice, opts *WriteOptions) error {

Callers 1

waitOnHeaderMethod · 0.95

Implementers 3

clientStreamstream.go
okStreaminternal/xds/httpfilter/fault/fault.go

Calls 2

ConvertFunction · 0.92
closeStreamMethod · 0.45

Tested by

no test coverage detected