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

Method Connect

sync2/example/before.go:13–19  ·  view source on GitHub ↗
(name string, client io.ReadWriter)

Source from the content-addressed store, hash-verified

11}
12
13func (channel *ChannelBefore) Connect(name string, client io.ReadWriter) {
14 channel.mu.Lock()
15 defer channel.mu.Unlock()
16
17 channel.broadcast(name + " connected")
18 channel.clients[name] = client
19}
20
21func (channel *ChannelBefore) Disconnect(name string) {
22 channel.mu.Lock()

Callers

nothing calls this directly

Calls 3

broadcastMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected