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

Method sendMessageToLink

pkg/wshutil/wshrouter.go:307–314  ·  view source on GitHub ↗
(msgBytes []byte, linkId baseds.LinkId, ingressLinkId baseds.LinkId)

Source from the content-addressed store, hash-verified

305}
306
307func (router *WshRouter) sendMessageToLink(msgBytes []byte, linkId baseds.LinkId, ingressLinkId baseds.LinkId) bool {
308 lm := router.getLinkMeta(linkId)
309 if lm == nil {
310 return false
311 }
312 router.sendRpcMessageToLink(lm.linkId, lm.client, msgBytes, ingressLinkId, "link")
313 return true
314}
315
316func (router *WshRouter) addToBacklog_withlock(linkId baseds.LinkId, msgBytes []byte, ingressLinkId baseds.LinkId, debugStr string) {
317 mapWasEmpty := len(router.linkMsgBacklog) == 0

Callers 2

sendRoutedMessageMethod · 0.95
runServerMethod · 0.95

Calls 2

getLinkMetaMethod · 0.95
sendRpcMessageToLinkMethod · 0.95

Tested by

no test coverage detected