You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
387 B

9 years ago
package net
7 years ago
func (n Network) SystemString() string {
switch n {
8 years ago
case Network_TCP:
8 years ago
return "tcp"
case Network_UDP:
8 years ago
return "udp"
default:
return "unknown"
}
}
// HasNetwork returns true if the network list has a certain network.
func HasNetwork(list []Network, network Network) bool {
for _, value := range list {
if value == network {
return true
}
}
return false
}