// ZMQ_HWM: Set high water mark
//
// See: http://api.zeromq.org/2-2:zmq-setsockopt#toc3
329243
func (soc *Socket) SetHwm(value uint64) error {
	return soc.setUInt64(C.ZMQ_HWM, value)
}
1296617
func (soc *Socket) SetCurveServerkey(key string) error {
	return soc.setString(C.ZMQ_CURVE_SERVERKEY, key)
}
588799
func (soc *Socket) SetSwap(value int64) error {
	return soc.setInt64(C.ZMQ_SWAP, value)
}
483147
func setSocketMark(fd, mark int) error {
	if err := syscall.SetsockoptInt(fd, syscall.SOL_SOCKET, syscall.SO_MARK, mark); err != nil {
		return os.NewSyscallError("failed to set mark", err)
	}
	return nil
}
31573
func (soc *Socket) SetRcvbuf(value uint64) error {
	return soc.setUInt64(C.ZMQ_RCVBUF, value)
}
1103285
func (soc *Socket) SetZapDomain(domain string) error {
	return soc.setString(C.ZMQ_ZAP_DOMAIN, domain)
}
70177
func (s *ContainerSettings) SetM3u8Settings(v *M3u8Settings) *ContainerSettings {
	s.M3u8Settings = v
	return s
}
939136
func (soc *Socket) SetVmciBufferSize(value uint64) error {
	if minor < 2 {
		return ErrorNotImplemented42
	}
	return soc.setUInt64(C.ZMQ_VMCI_BUFFER_SIZE, value)
}
19385
func (d *PCA9685) SetPwm(channel, onTime, offTime int) error {
	if err := d.setup(); err != nil {
		return err
	}

	onTimeLowReg := byte(pwm0OnLowReg + (4 * channel))

	onTimeLow := byte(onTime & 0xFF)
	onTimeHigh := byte(onTime >> 8)
	offTimeLow := byte(offTime & 0xFF)
	offTimeHigh := byte(offTime >> 8)

	if err := d.Bus.WriteByteToReg(d.Addr, onTimeLowReg, onTimeLow); err != nil {
		return err
	}

	glog.V(2).Infof("pca9685: writing on-time low [%#02x] to CHAN%v_ON_L reg [reg: %#02x]", onTimeLow, channel, onTimeLowReg)

	onTimeHighReg := onTimeLowReg + 1
	if err := d.Bus.WriteByteToReg(d.Addr, onTimeHighReg, onTimeHigh); err != nil {
		return err
	}
	glog.V(2).Infof("pca9685: writing on-time high [%#02x] to CHAN%v_ON_H reg [reg: %#02x]", onTimeHigh, channel, onTimeHighReg)

	offTimeLowReg := onTimeHighReg + 1
	if err := d.Bus.WriteByteToReg(d.Addr, offTimeLowReg, offTimeLow); err != nil {
		return err
	}
	glog.V(2).Infof("pca9685: writing off-time low [%#02x] to CHAN%v_OFF_L reg [reg: %#02x]", offTimeLow, channel, offTimeLowReg)

	offTimeHighReg := offTimeLowReg + 1
	if err := d.Bus.WriteByteToReg(d.Addr, offTimeHighReg, offTimeHigh); err != nil {
		return err
	}
	glog.V(2).Infof("pca9685: writing off-time high [%#02x] to CHAN%v_OFF_H reg [reg: %#02x]", offTimeHigh, channel, offTimeHighReg)

	return nil
}
1273722
func (soc *Socket) SetTcpMaxrt(value time.Duration) error {
	if minor < 2 {
		return ErrorNotImplemented42
	}
	val := int(value / time.Millisecond)
	return soc.setInt(C.ZMQ_TCP_MAXRT, val)
}
959726
func (soc *Socket) SetBacklog(value int) error {
	return soc.setInt(C.ZMQ_BACKLOG, value)
}
654474
func (soc *Socket) SetImmediate(value bool) error {
	val := 0
	if value {
		val = 1
	}
	return soc.setInt(C.ZMQ_IMMEDIATE, val)
}
687507
func (s *H264Settings) SetQvbrQualityLevel(v int64) *H264Settings {
	s.QvbrQualityLevel = &v
	return s
}
692541
func (s *H264QvbrSettings) SetQvbrQualityLevel(v int64) *H264QvbrSettings {
	s.QvbrQualityLevel = &v
	return s
}
935246
func (c *Ctx) SetDHParameters(dh *DH) error {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	if int(C.X_SSL_CTX_set_tmp_dh(c.ctx, dh.dh)) != 1 {
		return errorFromErrorQueue()
	}
	return nil
}
369455
func (soc *Socket) SetRate(value int64) error {
	return soc.setInt64(C.ZMQ_RATE, value)
}
766679
func (soc *Socket) SetVmciBufferMinSize(value uint64) error {
	if minor < 2 {
		return ErrorNotImplemented42
	}
	return soc.setUInt64(C.ZMQ_VMCI_BUFFER_MIN_SIZE, value)
}