mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-20 11:57:51 +01:00
Add Sequence field #13 to packet header according to latest Whitepaper 0.7.1
The field is yet to be used.
This commit is contained in:
@@ -45,6 +45,16 @@ func (c *Connection) IsLocal() bool {
|
||||
return IsIPLocal(c.Address.IP)
|
||||
}
|
||||
|
||||
// IsIPv4 checks if the connection is using IPv4
|
||||
func (c *Connection) IsIPv4() bool {
|
||||
return IsIPv4(c.Address.IP)
|
||||
}
|
||||
|
||||
// IsIPv6 checks if the connection is using IPv6
|
||||
func (c *Connection) IsIPv6() bool {
|
||||
return IsIPv6(c.Address.IP)
|
||||
}
|
||||
|
||||
// GetConnections returns the list of connections
|
||||
func (peer *PeerInfo) GetConnections(active bool) (connections []*Connection) {
|
||||
peer.RLock()
|
||||
|
||||
Reference in New Issue
Block a user