diff options
Diffstat (limited to 'listeners.go')
-rw-r--r-- | listeners.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/listeners.go b/listeners.go index bfbe6dd..39bd811 100644 --- a/listeners.go +++ b/listeners.go @@ -302,6 +302,16 @@ func (na NetworkAddress) isLoopback() bool { return false } +func (na NetworkAddress) isWildcardInterface() bool { + if na.Host == "" { + return true + } + if ip := net.ParseIP(na.Host); ip != nil { + return ip.IsUnspecified() + } + return false +} + func (na NetworkAddress) port() string { if na.StartPort == na.EndPort { return strconv.FormatUint(uint64(na.StartPort), 10) |