MCPcopy Create free account
hub / github.com/egonelbre/exp / broadcast

Method broadcast

sync2/example/before.go:33–41  ·  view source on GitHub ↗
(message string)

Source from the content-addressed store, hash-verified

31}
32
33func (channel *ChannelBefore) broadcast(message string) {
34 // channel.mu must be held
35 for name, client := range channel.clients {
36 n, err := client.Write([]byte(message))
37 if err != nil || n != len(message) {
38 channel.disconnect(name)
39 }
40 }
41}

Callers 2

ConnectMethod · 0.95
disconnectMethod · 0.95

Calls 2

disconnectMethod · 0.95
WriteMethod · 0.45

Tested by

no test coverage detected