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

Method CloseSend

stream.go:1427–1440  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1425}
1426
1427func (as *addrConnStream) CloseSend() error {
1428 if as.sentLast {
1429 // Return a nil error on repeated calls to this method.
1430 return nil
1431 }
1432 as.sentLast = true
1433
1434 as.transportStream.Write(nil, nil, &transport.WriteOptions{Last: true})
1435 // Always return nil; io.EOF is the only error that might make sense
1436 // instead, but there is no need to signal the client to call RecvMsg
1437 // as the only use left for the stream after CloseSend is to call
1438 // RecvMsg. This also matches historical behavior.
1439 return nil
1440}
1441
1442func (as *addrConnStream) Context() context.Context {
1443 return as.transportStream.Context()

Callers

nothing calls this directly

Calls 1

WriteMethod · 0.65

Tested by

no test coverage detected