// Dial creates a Client which communicates with the NAT gateway specified by
// addr.
Dial creates a Client which communicates with the NAT gateway specified by
addr.
// Dial creates a Client which communicates with the NAT gateway specified by // addr .
func Dial(addr string) (*Client, error) {
	gateway, err := net.ResolveUDPAddr("udp4", addr)
	if err != nil {
		return nil, err
	}
	pc, err := net.ListenPacket("udp4", ":0")
	if err != nil {
		return nil, err
	}
	return &Client{
		pc:      pc,
		gateway: gateway,
	}, nil
}
func Dial ( addr string ) ( * Client , error ) { gateway , err := net . ResolveUDPAddr ( " " , addr ) if err != nil { return nil , err } pc , err := net . ListenPacket ( " " , " " ) if err != nil { return nil , err } return & Client { pc : pc , gateway : gateway , } , nil }
Dial creates a Client which communicates with the NAT gateway specified by
addr.
Dial creates a Client which communicates with the NAT gateway specified by addr .
// TODO(mdlayher): create a second listener on 224.0.0.1:5350 to listen // to multicasts from a NAT gateway.