From a2651f4dfcab6075f147f6090bd14efdc67aa47d Mon Sep 17 00:00:00 2001 From: v2ray Date: Sun, 14 Aug 2016 17:07:52 +0200 Subject: [PATCH] address family interface --- common/net/address.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/net/address.go b/common/net/address.go index 477a60757..70569c37e 100644 --- a/common/net/address.go +++ b/common/net/address.go @@ -12,6 +12,14 @@ var ( AnyIP = IPAddress([]byte{0, 0, 0, 0}) ) +type AddressFamily int + +const ( + AddressFamilyIPv4 = AddressFamily(0) + AddressFamilyIPv6 = AddressFamily(1) + AddressFamilyDomain = AddressFamily(2) +) + // Address represents a network address to be communicated with. It may be an IP address or domain // address, not both. This interface doesn't resolve IP address for a given domain. type Address interface {