func Node SendByTupleNoConnect from etf Pid to etf Tuple msg etf Term

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
func (n *Node) SendByTupleNoConnect(from etf.Pid, to etf.Tuple, msg *etf.Term) {
toName, toNode := to[0], to[1].(etf.Atom)
lib.Log("Sending to %#v: %#v", to, *msg)
conn, ok := n.connections.Load(toNode)
if !ok {
lib.Log("Skip sending to %#v: no connection", to)
return
}
lib.Log("Sending to %v", conn.(nodeConn).conn.RemoteAddr())
ctl := etf.Tuple{REG_SEND, from, etf.Atom(""), toName}
conn.(nodeConn).wchan <- []etf.Term{ctl, *msg}
}