MCPcopy
hub / github.com/aceld/zinx / NotifyAll

Method NotifyAll

znotify/notify.go:77–88  ·  view source on GitHub ↗
(MsgId uint32, data []byte)

Source from the content-addressed store, hash-verified

75}
76
77func (n *notify) NotifyAll(MsgId uint32, data []byte) error {
78
79 n.connIdMap.IterCb(func(key string, v interface{}) {
80 conn, _ := v.(ziface.IConnection)
81 err := conn.SendMsg(MsgId, data)
82 if err != nil {
83 zlog.Ins().ErrorF("Notify to %s err:%s \n", key, err)
84 }
85 })
86
87 return nil
88}
89
90func (n *notify) NotifyBuffToConnByID(Id uint64, MsgId uint32, data []byte) error {
91 Conn, err := n.GetNotifyByID(Id)

Callers

nothing calls this directly

Calls 4

InsFunction · 0.92
IterCbMethod · 0.80
SendMsgMethod · 0.65
ErrorFMethod · 0.65

Tested by

no test coverage detected