MCPcopy
hub / github.com/connectrpc/connect-go / Send

Method Send

protocol_grpc.go:490–500  ·  view source on GitHub ↗
(msg any)

Source from the content-addressed store, hash-verified

488}
489
490func (hc *grpcHandlerConn) Send(msg any) error {
491 defer flushResponseWriter(hc.responseWriter)
492 if !hc.wroteToBody {
493 mergeHeaders(hc.responseWriter.Header(), hc.responseHeader)
494 hc.wroteToBody = true
495 }
496 if err := hc.marshaler.Marshal(msg); err != nil {
497 return err
498 }
499 return nil // must be a literal nil: nil *Error is a non-nil error
500}
501
502func (hc *grpcHandlerConn) ResponseHeader() http.Header {
503 return hc.responseHeader

Callers

nothing calls this directly

Calls 4

flushResponseWriterFunction · 0.85
mergeHeadersFunction · 0.85
HeaderMethod · 0.65
MarshalMethod · 0.65

Tested by

no test coverage detected