func (p *PollSet) File(f *os.File, events EventSet) (index int) {
	return p.Fd(f.Fd(), events)
}
Shortcut that calls Fd() with the file's file descriptor.
package zmq
import "C"
import (
	"os"
	"time"
)
type EventSet int
const (
	In EventSet = C.ZMQ_POLLIN
	Out = C.ZMQ_POLLOUT
	Error = C.ZMQ_POLLERR
	None = 0
)
func (e EventSet) CanRecv() bool {
	return e&In != 0
}
func (e EventSet) CanSend() bool {
	return e&Out != 0
}
func (e EventSet) HasError() bool {
	return e&Error != 0
}
type PollSet struct {
	items []C.zmq_pollitem_t
}
func (p *PollSet) Socket(sock *Socket, events EventSet) (index int) {
	item := C.zmq_pollitem_t{
		socket: sock.sock,
		events: C.short(events),
	}
	index = len(p.items)
	p.items = append(p.items, item)
	return
}
func (p *PollSet) Fd(fd uintptr, events EventSet) (index int) {
	item := C.zmq_pollitem_t{
		fd:     C.int(fd),
		events: C.short(events),
	}
	index = len(p.items)
	p.items = append(p.items, item)
	return
}