func (soc *Socket) SetProbeRouter(value int) error {
	return soc.setInt(C.ZMQ_PROBE_ROUTER, value)
}
ZMQ_PROBE_ROUTER: bootstrap connections to ROUTER sockets

See: http://api.zeromq.org/4-1:zmq-setsockopt#toc25
package zmq4
import "C"
import (
	"time"
	"unsafe"
)
func (soc *Socket) setString(opt C.int, s string) error {
	if !soc.opened {
		return ErrorSocketClosed
	}
	cs := C.CString(s)
	defer C.free(unsafe.Pointer(cs))
	var i C.int
	var err error
	for {
		i, err = C.zmq4_setsockopt(soc.soc, opt, unsafe.Pointer(cs), C.size_t(len(s)))
		if i == 0 || !soc.ctx.retry(err) {
			break
		}
	}
	if i != 0 {
		return errget(err)
	}
	return nil
}
func (soc *Socket) setNullString(opt C.int) error {
	if !soc.opened {
		return ErrorSocketClosed
	}
	var i C.int
	var err error
	for {
		i, err = C.zmq4_setsockopt(soc.soc, opt, nil, 0)
		if i == 0 || !soc.ctx.retry(err) {
			break
		}
	}
	if i != 0 {
		return errget(err)
	}
	return nil
}
func (soc *Socket) setInt(opt C.int, value int) error {
	if !soc.opened {
		return ErrorSocketClosed
	}
	val := C.int(value)
	var i C.int
	var err error
	for {
		i, err = C.zmq4_setsockopt(soc.soc, opt, unsafe.Pointer(&val), C.size_t(unsafe.Sizeof(val)))
		if i == 0 || !soc.ctx.retry(err) {
			break
		}
	}
	if i != 0 {
		return errget(err)
	}
	return nil
}
func (soc *Socket) setInt64(opt C.int, value int64) error {
	if !soc.opened {
		return ErrorSocketClosed
	}
	val := C.int64_t(value)
	var i C.int
	var err error
	for {
		i, err = C.zmq4_setsockopt(soc.soc, opt, unsafe.Pointer(&val), C.size_t(unsafe.Sizeof(val)))
		if i == 0 || !soc.ctx.retry(err) {
			break
		}
	}
	if i != 0 {
		return errget(err)
	}
	return nil
}
func (soc *Socket) setUInt64(opt C.int, value uint64) error {
	if !soc.opened {
		return ErrorSocketClosed
	}
	val := C.uint64_t(value)
	var i C.int
	var err error
	for {
		i, err = C.zmq4_setsockopt(soc.soc, opt, unsafe.Pointer(&val), C.size_t(unsafe.Sizeof(val)))
		if i == 0 || !soc.ctx.retry(err) {
			break
		}
	}
	if i != 0 {
		return errget(err)
	}
	return nil
}
func (soc *Socket) SetSndhwm(value int) error {
	return soc.setInt(C.ZMQ_SNDHWM, value)
}
func (soc *Socket) SetRcvhwm(value int) error {
	return soc.setInt(C.ZMQ_RCVHWM, value)
}
func (soc *Socket) SetAffinity(value uint64) error {
	return soc.setUInt64(C.ZMQ_AFFINITY, value)
}
func (soc *Socket) SetSubscribe(filter string) error {
	return soc.setString(C.ZMQ_SUBSCRIBE, filter)
}
func (soc *Socket) SetUnsubscribe(filter string) error {
	return soc.setString(C.ZMQ_UNSUBSCRIBE, filter)
}
func (soc *Socket) SetIdentity(value string) error {
	return soc.setString(C.ZMQ_IDENTITY, value)
}
func (soc *Socket) SetRate(value int) error {
	return soc.setInt(C.ZMQ_RATE, value)
}
func (soc *Socket) SetRecoveryIvl(value time.Duration) error {
	val := int(value / time.Millisecond)
	return soc.setInt(C.ZMQ_RECOVERY_IVL, val)
}
func (soc *Socket) SetSndbuf(value int) error {
	return soc.setInt(C.ZMQ_SNDBUF, value)
}
func (soc *Socket) SetRcvbuf(value int) error {
	return soc.setInt(C.ZMQ_RCVBUF, value)
}
func (soc *Socket) SetLinger(value time.Duration) error {
	val := int(value / time.Millisecond)
	if value == -1 {
		val = -1
	}
	return soc.setInt(C.ZMQ_LINGER, val)
}
func (soc *Socket) SetReconnectIvl(value time.Duration) error {
	val := int(value / time.Millisecond)
	if value == -1 {
		val = -1
	}
	return soc.setInt(C.ZMQ_RECONNECT_IVL, val)
}
func (soc *Socket) SetReconnectIvlMax(value time.Duration) error {
	val := int(value / time.Millisecond)
	return soc.setInt(C.ZMQ_RECONNECT_IVL_MAX, val)
}
func (soc *Socket) SetBacklog(value int) error {
	return soc.setInt(C.ZMQ_BACKLOG, value)
}
func (soc *Socket) SetMaxmsgsize(value int64) error {
	return soc.setInt64(C.ZMQ_MAXMSGSIZE, value)
}
func (soc *Socket) SetMulticastHops(value int) error {
	return soc.setInt(C.ZMQ_MULTICAST_HOPS, value)
}
func (soc *Socket) SetRcvtimeo(value time.Duration) error {
	val := int(value / time.Millisecond)
	if value == -1 {
		val = -1
	}
	return soc.setInt(C.ZMQ_RCVTIMEO, val)
}
func (soc *Socket) SetSndtimeo(value time.Duration) error {
	val := int(value / time.Millisecond)
	if value == -1 {
		val = -1
	}
	return soc.setInt(C.ZMQ_SNDTIMEO, val)
}
func (soc *Socket) SetIpv6(value bool) error {
	val := 0
	if value {
		val = 1
	}
	return soc.setInt(C.ZMQ_IPV6, val)
}
func (soc *Socket) SetImmediate(value bool) error {
	val := 0
	if value {
		val = 1
	}
	return soc.setInt(C.ZMQ_IMMEDIATE, val)
}
func (soc *Socket) SetRouterMandatory(value int) error {
	return soc.setInt(C.ZMQ_ROUTER_MANDATORY, value)
}
func (soc *Socket) SetRouterRaw(value int) error {
	return soc.setInt(C.ZMQ_ROUTER_RAW, value)
}