: status = zmq_setsockopt (sock, optionid, value)

Set a socket option on a zeromq socket.

Inputs

sock - the socket to connect.

optionid - the setsockopt option to set.

value - the value to set.

Known valid optionids are:

ZMQ_SUBSCRIBE

Subscribe to incoming messages matching the value. The value is either a string or a uint8 array that must match the start of any incoming message

ZMQ_UNSUBSCRIBE

Unsubscribe from incoming messages

ZMQ_CONNECT_TIMEOUT

Set timeout for connect calls

ZMQ_IDENTITY or ZMQ_ROUTING_ID

Set the identity of a socket (string or uint8 data)

ZMQ_RATE

Set the multicast data rate

ZMQ_PRIORITY

Set the socket priority (linux only)

ZMQ_BACKLOG

Set the queue length for incomming connections

ZMQ_SOCKS_PROXY

Set the socks5 proxy value (string)

ZMQ_CURVE_SERVER

Set whether socket is a curve server (1) or not (0)

ZMQ_CURVE_PRIVATEKEY

Set the curve socket private key (string)

ZMQ_CURVE_PUBLICKEY

Set the curve socket public key (string)

ZMQ_CURVE_SERVERKEY

Set the curve socket public key (string)

ZMQ_PLAIN_SERVER

Set whether socket server will use plain authentication (1) or not (0)

ZMQ_PLAIN_USERNAME

Set the plain socket username (string)

ZMQ_PLAIN_PASSWORD

Set the plain socket password (string)

ZMQ_GSSAPI_SERVER

Set whether socket server will use gssapi authentication (1) or not (0)

ZMQ_GSSAPI_PLAINTEXT

Set whether socket will encrypt gssapi authentication (1) or not (0)

ZMQ_GSSAPI_PRINCIPAL

Set the name of the gssapi principal (string)

ZMQ_GSSAPI_SERVICE_PRINCIPAL

Set the name of the gssapi service principal (string)

Outputs

status - status for setsockopt. On success, setsockopt will return status of true

See also: zmq_getsockopt, ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE, ZMQ_CONNECT_TIMEOUT.

Package: zeromq