(linkId baseds.LinkId, client AbstractRpcClient, msgBytes []byte, ingressLinkId baseds.LinkId, debugStr string)
| 336 | } |
| 337 | |
| 338 | func (router *WshRouter) sendRpcMessageToLink(linkId baseds.LinkId, client AbstractRpcClient, msgBytes []byte, ingressLinkId baseds.LinkId, debugStr string) { |
| 339 | router.lock.Lock() |
| 340 | defer router.lock.Unlock() |
| 341 | sent := false |
| 342 | backlog := router.linkMsgBacklog[linkId] |
| 343 | if len(backlog) == 0 { |
| 344 | sent = client.SendRpcMessage(msgBytes, ingressLinkId, debugStr) |
| 345 | } |
| 346 | if !sent { |
| 347 | router.addToBacklog_withlock(linkId, msgBytes, ingressLinkId, debugStr) |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | func (router *WshRouter) runServer() { |
| 352 | for input := range router.inputCh { |
no test coverage detected