MCPcopy
hub / github.com/wavetermdev/waveterm / SendRpcMessage

Method SendRpcMessage

pkg/wshutil/wshproxy.go:46–60  ·  view source on GitHub ↗
(msg []byte, ingressLinkId baseds.LinkId, debugStr string)

Source from the content-addressed store, hash-verified

44}
45
46func (p *WshRpcProxy) SendRpcMessage(msg []byte, ingressLinkId baseds.LinkId, debugStr string) bool {
47 defer func() {
48 panicCtx := "WshRpcProxy.SendRpcMessage"
49 if debugStr != "" {
50 panicCtx = fmt.Sprintf("%s:%s", panicCtx, debugStr)
51 }
52 panichandler.PanicHandler(panicCtx, recover())
53 }()
54 select {
55 case p.ToRemoteCh <- msg:
56 return true
57 default:
58 return false
59 }
60}
61
62func (p *WshRpcProxy) RecvRpcMessage() ([]byte, bool) {
63 inputVal, more := <-p.FromRemoteCh

Callers

nothing calls this directly

Calls 1

PanicHandlerFunction · 0.92

Tested by

no test coverage detected