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

Method Connect

sync2/example/after.go:14–20  ·  view source on GitHub ↗
(name string, client io.ReadWriter)

Source from the content-addressed store, hash-verified

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

Callers 3

withSchemaFunction · 0.45
WithDockerFunction · 0.45
withDatabaseFunction · 0.45

Calls 3

broadcastMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by 3

withSchemaFunction · 0.36
WithDockerFunction · 0.36
withDatabaseFunction · 0.36