Add udp listener and did some change for debug purpose.

This commit is contained in:
Zoltan Papp
2024-05-19 12:41:06 +02:00
parent d4eaec5cbd
commit 9ac5a1ed3f
9 changed files with 224 additions and 26 deletions

View File

@ -0,0 +1,14 @@
package udp
import (
"net"
)
func Dial(address string) (net.Conn, error) {
udpAddr, err := net.ResolveUDPAddr("udp", address)
if err != nil {
return nil, err
}
return net.DialUDP("udp", nil, udpAddr)
}