MCPcopy Create free account
hub / github.com/DNAProject/DNA / AddInConnRecord

Method AddInConnRecord

p2pserver/net/netserver/netserver.go:520–525  ·  view source on GitHub ↗

AddInConnRecord add in connection to inConnRecord

(addr string)

Source from the content-addressed store, hash-verified

518
519//AddInConnRecord add in connection to inConnRecord
520func (this *NetServer) AddInConnRecord(addr string) {
521 this.inConnRecord.Lock()
522 defer this.inConnRecord.Unlock()
523 this.inConnRecord.InConnectingAddrs.Insert(addr)
524 log.Debugf("[p2p]add in record %s", addr)
525}
526
527//IsAddrInInConnRecord return result whether addr is in inConnRecordList
528func (this *NetServer) IsAddrInInConnRecord(addr string) bool {

Callers 2

startNetAcceptMethod · 0.95
TestInConnAPIFunction · 0.80

Calls 2

DebugfFunction · 0.92
InsertMethod · 0.45

Tested by 1

TestInConnAPIFunction · 0.64