1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-06-22 18:59:55 -04:00

remove IsTCP() and IsUDP()

This commit is contained in:
Darien Raymond
2016-09-19 16:39:11 +02:00
parent 5291624165
commit 9ade07db03
9 changed files with 15 additions and 20 deletions

View File

@@ -78,7 +78,7 @@ func (dest *tcpDestination) Equals(another Destination) bool {
if dest == nil || another == nil {
return false
}
if !another.IsTCP() {
if another.Network() != TCPNetwork {
return false
}
return dest.Port() == another.Port() && dest.Address().Equals(another.Address())
@@ -124,7 +124,7 @@ func (dest *udpDestination) Equals(another Destination) bool {
if dest == nil || another == nil {
return false
}
if !another.IsUDP() {
if another.Network() != UDPNetwork {
return false
}
return dest.Port() == another.Port() && dest.Address().Equals(another.Address())