Golang net.ListenPacket() function example

package net

Golang net.ListenPacket() function usage example

 // replace x with your targer address
 laddr := &net.IPAddr{IP: net.IPv4(x, x, x, x)}
 packConn, err := net.DialIP("ip:tcp", laddr)

References :

http://golang.org/pkg/net/#ListenPacket

https://www.socketloop.com/references/golang-net-dialip-function-example

Advertisement