MCPcopy Index your code
hub / github.com/coder/coder / sendReply

Method sendReply

vpn/speaker.go:363–376  ·  view source on GitHub ↗
(reply S)

Source from the content-addressed store, hash-verified

361}
362
363func (r *request[S, _]) sendReply(reply S) error {
364 rrpc := reply.EnsureRPC()
365 mrpc := r.msg.GetRpc()
366 if mrpc == nil {
367 return xerrors.Errorf("message didn't want a reply")
368 }
369 rrpc.ResponseTo = mrpc.MsgId
370 select {
371 case <-r.ctx.Done():
372 return r.ctx.Err()
373 case r.replyCh <- reply:
374 }
375 return nil
376}

Callers 4

handleRPCMethod · 0.80
sendUpdateResponseMethod · 0.80

Calls 5

ErrMethod · 0.80
EnsureRPCMethod · 0.65
GetRpcMethod · 0.65
ErrorfMethod · 0.45
DoneMethod · 0.45

Tested by 2