func (c *Conn) Close() error {
	return newOpError("close", c.sock.Close())
}
Close closes the connection and unblocks any pending read operations.
package netlink
import (
	"math/rand"
	"sync"
	"sync/atomic"
	"syscall"
	"time"
	"golang.org/x/net/bpf"
)
type Conn struct {
	seq uint32
	mu sync.RWMutex
	sock Socket
	pid uint32
	d *debugger
}
type Socket interface {
	Close() error
	Send(m Message) error
	SendMessages(m []Message) error
	Receive() ([]Message, error)
}
func Dial(family int, config *Config) (*Conn, error) {
	c, pid, err := dial(family, config)
	if err != nil {
		return nil, err
	}
	return NewConn(c, pid), nil
}
func NewConn(sock Socket, pid uint32) *Conn {
	r := rand.New(rand.NewSource(time.Now().UnixNano()))
	seq := r.Uint32()
	var d *debugger
	if len(debugArgs) > 0 {
		d = newDebugger(debugArgs)
	}
	return &Conn{
		seq:  seq,
		sock: sock,
		pid:  pid,
		d:    d,
	}
}
func (c *Conn) debug(fn func(d *debugger)) {
	if c.d == nil {
		return
	}
	fn(c.d)
}