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

Method IsAddrInInConnRecord

p2pserver/net/netserver/netserver.go:528–533  ·  view source on GitHub ↗

IsAddrInInConnRecord return result whether addr is in inConnRecordList

(addr string)

Source from the content-addressed store, hash-verified

526
527//IsAddrInInConnRecord return result whether addr is in inConnRecordList
528func (this *NetServer) IsAddrInInConnRecord(addr string) bool {
529 this.inConnRecord.RLock()
530 defer this.inConnRecord.RUnlock()
531
532 return this.inConnRecord.InConnectingAddrs.Has(addr)
533}
534
535//IsIPInInConnRecord return result whether the IP is in inConnRecordList
536func (this *NetServer) IsIPInInConnRecord(ip string) bool {

Callers 1

startNetAcceptMethod · 0.95

Calls 1

HasMethod · 0.65

Tested by

no test coverage detected