This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// usage: | |
// Start udp-echoserv.go and use the commandline tool sendip | |
// $ sendip -p ipv4 -is 192.168.1.81 -p udp -us 5070 -ud 5000 -d "Hello, World" -v 127.0.0.1 | |
// where -is and -us are arbitrary and -ud is the port used in ResolveUDPAddr | |
import ( | |
"fmt" | |
"net" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"net/http" | |
) | |
func main() { |