MCPcopy Create free account
hub / github.com/bytemode/pitaya-notes / IPVersion

Method IPVersion

agent/agent.go:290–299  ·  view source on GitHub ↗

IPVersion returns the remote address ip version. net.TCPAddr and net.UDPAddr implementations of String() always construct result as : on both ipv4 and ipv6. Also, to see if the ip is ipv6 they both check if there is a colon on the string. So checking if there are more than one colon here i

()

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

TestIPVersionFunction · 0.95
processPacketMethod · 0.80

Calls 3

RemoteAddrMethod · 0.95
CountMethod · 0.65
StringMethod · 0.45

Tested by 1

TestIPVersionFunction · 0.76