func (sck *Socket) Close() error {
	return unix.Close(sck.dev.fd)
}
Close closes the CAN bus socket.
package canbus
import (
	"encoding/binary"
	"errors"
	"io"
	"net"
	"unsafe"
	"golang.org/x/sys/unix"
)
var (
	errDataTooBig = errors.New("canbus: data too big")
)
func New() (*Socket, error) {
	fd, err := unix.Socket(unix.AF_CAN, unix.SOCK_RAW, unix.CAN_RAW)
	if err != nil {
		return nil, err
	}
	return &Socket{dev: device{fd}}, nil
}
type Socket struct {
	iface *net.Interface
	addr  *unix.SockaddrCAN
	dev   device
}
func (sck *Socket) Name() string {
	if sck.iface == nil {
		return "N/A"
	}
	return sck.iface.Name
}