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

Struct serverStream

stream.go:1632–1664  ·  view source on GitHub ↗

serverStream implements a server side Stream.

Source from the content-addressed store, hash-verified

1630
1631// serverStream implements a server side Stream.
1632type serverStream struct {
1633 ctx context.Context
1634 s *transport.ServerStream
1635 p parser
1636 codec baseCodec
1637 desc *StreamDesc
1638
1639 compressorV0 Compressor
1640 compressorV1 encoding.Compressor
1641 decompressorV0 Decompressor
1642 decompressorV1 encoding.Compressor
1643
1644 sendCompressorName string
1645
1646 recvFirstMsg bool // set after the first message is received
1647
1648 maxReceiveMessageSize int
1649 maxSendMessageSize int
1650 trInfo *traceInfo
1651
1652 statsHandler stats.Handler
1653
1654 binlogs []binarylog.MethodLogger
1655 // serverHeaderBinlogged indicates whether server header has been logged. It
1656 // will happen when one of the following two happens: stream.SendHeader(),
1657 // stream.Send().
1658 //
1659 // It's only checked in send and sendHeader, doesn't need to be
1660 // synchronized.
1661 serverHeaderBinlogged bool
1662
1663 mu sync.Mutex // protects trInfo.tr after the service handler runs.
1664}
1665
1666func (ss *serverStream) Context() context.Context {
1667 return ss.ctx

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected