mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-04-27 08:55:18 +08:00
删除一直未实现的Unix协议相关内容
This commit is contained in:
@@ -9,10 +9,10 @@ const (
|
||||
ProtocolHTTPS Protocol = "https"
|
||||
ProtocolTCP Protocol = "tcp"
|
||||
ProtocolTLS Protocol = "tls"
|
||||
ProtocolUnix Protocol = "unix"
|
||||
ProtocolUDP Protocol = "udp"
|
||||
|
||||
// 子协议
|
||||
|
||||
ProtocolHTTP4 Protocol = "http4"
|
||||
ProtocolHTTP6 Protocol = "http6"
|
||||
|
||||
@@ -27,7 +27,7 @@ const (
|
||||
)
|
||||
|
||||
func AllProtocols() []Protocol {
|
||||
return []Protocol{ProtocolHTTP, ProtocolHTTPS, ProtocolTCP, ProtocolTLS, ProtocolUnix, ProtocolUDP, ProtocolHTTP4, ProtocolHTTP6, ProtocolHTTPS4, ProtocolHTTPS6, ProtocolTCP4, ProtocolTCP6, ProtocolTLS4, ProtocolTLS6}
|
||||
return []Protocol{ProtocolHTTP, ProtocolHTTPS, ProtocolTCP, ProtocolTLS, ProtocolUDP, ProtocolHTTP4, ProtocolHTTP6, ProtocolHTTPS4, ProtocolHTTPS6, ProtocolTCP4, ProtocolTCP6, ProtocolTLS4, ProtocolTLS6}
|
||||
}
|
||||
|
||||
func (this Protocol) IsHTTPFamily() bool {
|
||||
@@ -46,10 +46,6 @@ func (this Protocol) IsTLSFamily() bool {
|
||||
return this == ProtocolTLS || this == ProtocolTLS4 || this == ProtocolTLS6
|
||||
}
|
||||
|
||||
func (this Protocol) IsUnixFamily() bool {
|
||||
return this == ProtocolUnix
|
||||
}
|
||||
|
||||
func (this Protocol) IsUDPFamily() bool {
|
||||
return this == ProtocolUDP
|
||||
}
|
||||
@@ -69,8 +65,6 @@ func (this Protocol) Primary() Protocol {
|
||||
return ProtocolTCP
|
||||
case ProtocolTLS, ProtocolTLS4, ProtocolTLS6:
|
||||
return ProtocolTLS
|
||||
case ProtocolUnix:
|
||||
return ProtocolUnix
|
||||
case ProtocolUDP:
|
||||
return ProtocolUDP
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user