Set a socket option

- « ZMQSocket::sendmulti

- ZMQSocket::unbind »

- PHP Manual
- ZMQSocket
- Set a socket option

# ZMQSocket::setSockOpt

(PECL zmq >= 0.5.0)

ZMQSocket::setSockOpt — Set a socket option

### Description

public ZMQSocket::setSockOpt(int `$key`, mixed `$value`): ZMQSocket

Sets a ZMQ socket option. The type of the `value` depends on the `key`. See ZMQ Constant Types for more information.

### Parameters

`key`

  One of the `ZMQ::SOCKOPT_*` constants.

`value`

  The value of the parameter.

### Return Values

Returns the current object. Throws ZMQSocketException on error.