func (c *PacketConn) SetReadDeadline(t time.Time) error {
	if !c.payloadHandler.ok() {
		return syscall.EINVAL
	}
	return c.payloadHandler.SetReadDeadline(t)
}
SetReadDeadline sets the read deadline associated with the
endpoint.
package ipv6
import (
	"net"
	"syscall"
	"time"
	"golang.org/x/net/internal/netreflect"
)
type Conn struct {
	genericOpt
}
type genericOpt struct {
	net.Conn
}
func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil }
func (c *Conn) PathMTU() (int, error) {
	if !c.genericOpt.ok() {
		return 0, syscall.EINVAL
	}
	s, err := netreflect.SocketOf(c.genericOpt.Conn)
	if err != nil {
		return 0, err
	}
	_, mtu, err := getMTUInfo(s, &sockOpts[ssoPathMTU])
	if err != nil {
		return 0, err
	}
	return mtu, nil
}
func NewConn(c net.Conn) *Conn {
	return &Conn{
		genericOpt: genericOpt{Conn: c},
	}
}
type PacketConn struct {
	genericOpt
	dgramOpt
	payloadHandler
}
type dgramOpt struct {
	net.PacketConn
}
func (c *dgramOpt) ok() bool { return c != nil && c.PacketConn != nil }
func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error {
	if !c.payloadHandler.ok() {
		return syscall.EINVAL
	}
	s, err := netreflect.PacketSocketOf(c.dgramOpt.PacketConn)
	if err != nil {
		return err
	}
	return setControlMessage(s, &c.payloadHandler.rawOpt, cf, on)
}
func (c *PacketConn) SetDeadline(t time.Time) error {
	if !c.payloadHandler.ok() {
		return syscall.EINVAL
	}
	return c.payloadHandler.SetDeadline(t)
}