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

Method StreamingInputCall

interop/test_utils.go:788–803  ·  view source on GitHub ↗
(stream testgrpc.TestService_StreamingInputCallServer)

Source from the content-addressed store, hash-verified

786}
787
788func (s *testServer) StreamingInputCall(stream testgrpc.TestService_StreamingInputCallServer) error {
789 var sum int
790 for {
791 in, err := stream.Recv()
792 if err == io.EOF {
793 return stream.SendAndClose(&testpb.StreamingInputCallResponse{
794 AggregatedPayloadSize: int32(sum),
795 })
796 }
797 if err != nil {
798 return err
799 }
800 p := in.GetPayload().GetBody()
801 sum += len(p)
802 }
803}
804
805func (s *testServer) FullDuplexCall(stream testgrpc.TestService_FullDuplexCallServer) error {
806 if md, ok := metadata.FromIncomingContext(stream.Context()); ok {

Callers

nothing calls this directly

Calls 4

RecvMethod · 0.65
SendAndCloseMethod · 0.65
GetBodyMethod · 0.45
GetPayloadMethod · 0.45

Tested by

no test coverage detected