MCPcopy
hub / github.com/tinode/chat / handleProxyBroadcast

Method handleProxyBroadcast

server/topic_proxy.go:255–266  ·  view source on GitHub ↗

handleProxyBroadcast broadcasts a Data, Info or Pres message to sessions attached to this proxy topic.

(msg *ServerComMessage)

Source from the content-addressed store, hash-verified

253
254// handleProxyBroadcast broadcasts a Data, Info or Pres message to sessions attached to this proxy topic.
255func (t *Topic) handleProxyBroadcast(msg *ServerComMessage) {
256 if t.isInactive() {
257 // Ignore broadcast - topic is paused or being deleted.
258 return
259 }
260
261 if msg.Data != nil {
262 t.lastID = msg.Data.SeqId
263 }
264
265 t.broadcastToSessions(msg)
266}
267
268// proxyCtrlBroadcast broadcasts a ctrl command to certain sessions attached to this proxy topic.
269func (t *Topic) proxyCtrlBroadcast(msg *ServerComMessage) {

Callers 1

proxyMasterResponseMethod · 0.95

Calls 2

isInactiveMethod · 0.95
broadcastToSessionsMethod · 0.95

Tested by

no test coverage detected