MCPcopy
hub / github.com/chaozh/MIT-6.824 / Enable

Method Enable

src/labrpc/labrpc.go:356–361  ·  view source on GitHub ↗

enable/disable a ClientEnd.

(endname interface{}, enabled bool)

Source from the content-addressed store, hash-verified

354
355// enable/disable a ClientEnd.
356func (rn *Network) Enable(endname interface{}, enabled bool) {
357 rn.mu.Lock()
358 defer rn.mu.Unlock()
359
360 rn.enabled[endname] = enabled
361}
362
363// get a server's count of incoming RPCs.
364func (rn *Network) GetCount(servername interface{}) int {

Callers 15

connectUnlockedMethod · 0.80
disconnectUnlockedMethod · 0.80
ConnectClientUnlockedMethod · 0.80
connectUnlockedMethod · 0.80
disconnectUnlockedMethod · 0.80
ConnectClientUnlockedMethod · 0.80
TestBasicFunction · 0.80
TestTypesFunction · 0.80
TestDisconnectFunction · 0.80
TestCountsFunction · 0.80

Calls

no outgoing calls

Tested by 11

TestBasicFunction · 0.64
TestTypesFunction · 0.64
TestDisconnectFunction · 0.64
TestCountsFunction · 0.64
TestBytesFunction · 0.64
TestConcurrentManyFunction · 0.64
TestUnreliableFunction · 0.64
TestConcurrentOneFunction · 0.64
TestRegression1Function · 0.64
TestKilledFunction · 0.64
TestBenchmarkFunction · 0.64