func (header *Header) Ports() (sourcePort, destPort int, ok bool) {
	if sourceAddr, destAddr, ok := header.TCPAddrs(); ok {
		return sourceAddr.Port, destAddr.Port, true
	} else if sourceAddr, destAddr, ok := header.UDPAddrs(); ok {
		return sourceAddr.Port, destAddr.Port, true
	} else {
		return 0, 0, false
	}
}
// Ports returns the ports for the proxy protocol header.
Ports returns the ports for the proxy protocol header.
// Ports returns the ports for the proxy protocol header .
func (header *Header) Ports() (sourcePort, destPort int, ok bool) {
	if sourceAddr, destAddr, ok := header.TCPAddrs(); ok {
		return sourceAddr.Port, destAddr.Port, true
	} else if sourceAddr, destAddr, ok := header.UDPAddrs(); ok {
		return sourceAddr.Port, destAddr.Port, true
	} else {
		return 0, 0, false
	}
}
func ( header * Header ) Ports ( ) ( sourcePort , destPort int , ok bool ) { if sourceAddr , destAddr , ok := header . TCPAddrs ( ) ; ok { return sourceAddr . Port , destAddr . Port , true } else if sourceAddr , destAddr , ok := header . UDPAddrs ( ) ; ok { return sourceAddr . Port , destAddr . Port , true } else { return 0 , 0 , false } }
Ports returns the ports for the proxy protocol header.
Ports returns the ports for the proxy protocol header .