func (c *UDPConn) ReadFrom(p []byte) (n int, addr net.Addr, err error) {
	n, addr, err = c.PacketConn.ReadFrom(c.bufRead[:])
	if err != nil {
		return 0, nil, err
	}
	if n < len(c.prefix) || addr.String() != c.proxyAddress.String() {
		return 0, nil, errBadHeader
	}
	buf := bytes.NewBuffer(c.bufRead[len(c.prefix):])
	a, err := readAddr(buf)
	if err != nil {
		return 0, nil, err
	}
	n = copy(p, buf.Bytes())
	return n, a, nil
}
// ReadFrom implements the net.PacketConn ReadFrom method.
ReadFrom implements the net.PacketConn ReadFrom method.
// ReadFrom implements the net . PacketConn ReadFrom method .
func (c *UDPConn) ReadFrom(p []byte) (n int, addr net.Addr, err error) {
	n, addr, err = c.PacketConn.ReadFrom(c.bufRead[:])
	if err != nil {
		return 0, nil, err
	}
	if n < len(c.prefix) || addr.String() != c.proxyAddress.String() {
		return 0, nil, errBadHeader
	}
	buf := bytes.NewBuffer(c.bufRead[len(c.prefix):])
	a, err := readAddr(buf)
	if err != nil {
		return 0, nil, err
	}
	n = copy(p, buf.Bytes())
	return n, a, nil
}
func ( c * UDPConn ) ReadFrom ( p [ ] byte ) ( n int , addr net . Addr , err error ) { n , addr , err = c . PacketConn . ReadFrom ( c . bufRead [ : ] ) if err != nil { return 0 , nil , err } if n < len ( c . prefix ) || addr . String ( ) != c . proxyAddress . String ( ) { return 0 , nil , errBadHeader } buf := bytes . NewBuffer ( c . bufRead [ len ( c . prefix ) : ] ) a , err := readAddr ( buf ) if err != nil { return 0 , nil , err } n = copy ( p , buf . Bytes ( ) ) return n , a , nil }
ReadFrom implements the net.PacketConn ReadFrom method.
ReadFrom implements the net . PacketConn ReadFrom method .