Refactor: new dialer impl

This commit is contained in:
xjasonlyu
2022-03-29 00:02:19 +08:00
parent 42d6c96b6b
commit a4bedf6080
16 changed files with 310 additions and 199 deletions

View File

@@ -0,0 +1,19 @@
package dialer
func isTCPSocket(network string) bool {
switch network {
case "tcp", "tcp4", "tcp6":
return true
default:
return false
}
}
func isUDPSocket(network string) bool {
switch network {
case "udp", "udp4", "udp6":
return true
default:
return false
}
}