zmq_getsockopt.txt 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018
  1. zmq_getsockopt(3)
  2. =================
  3. NAME
  4. ----
  5. zmq_getsockopt - get 0MQ socket options
  6. SYNOPSIS
  7. --------
  8. *int zmq_getsockopt (void '*socket', int 'option_name', void '*option_value', size_t '*option_len');*
  9. DESCRIPTION
  10. -----------
  11. The _zmq_getsockopt()_ function shall retrieve the value for the option
  12. specified by the 'option_name' argument for the 0MQ socket pointed to by the
  13. 'socket' argument, and store it in the buffer pointed to by the 'option_value'
  14. argument. The 'option_len' argument is the size in bytes of the buffer pointed
  15. to by 'option_value'; upon successful completion _zmq_getsockopt()_ shall
  16. modify the 'option_len' argument to indicate the actual size of the option
  17. value stored in the buffer.
  18. The following options can be retrieved with the _zmq_getsockopt()_ function:
  19. ZMQ_AFFINITY: Retrieve I/O thread affinity
  20. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  21. The 'ZMQ_AFFINITY' option shall retrieve the I/O thread affinity for newly
  22. created connections on the specified 'socket'.
  23. Affinity determines which threads from the 0MQ I/O thread pool associated with
  24. the socket's _context_ shall handle newly created connections. A value of zero
  25. specifies no affinity, meaning that work shall be distributed fairly among all
  26. 0MQ I/O threads in the thread pool. For non-zero values, the lowest bit
  27. corresponds to thread 1, second lowest bit to thread 2 and so on. For example,
  28. a value of 3 specifies that subsequent connections on 'socket' shall be handled
  29. exclusively by I/O threads 1 and 2.
  30. See also linkzmq:zmq_init[3] for details on allocating the number of I/O
  31. threads for a specific _context_.
  32. [horizontal]
  33. Option value type:: uint64_t
  34. Option value unit:: N/A (bitmap)
  35. Default value:: 0
  36. Applicable socket types:: N/A
  37. ZMQ_BACKLOG: Retrieve maximum length of the queue of outstanding connections
  38. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  39. The 'ZMQ_BACKLOG' option shall retrieve the maximum length of the queue of
  40. outstanding peer connections for the specified 'socket'; this only applies to
  41. connection-oriented transports. For details refer to your operating system
  42. documentation for the 'listen' function.
  43. [horizontal]
  44. Option value type:: int
  45. Option value unit:: connections
  46. Default value:: 100
  47. Applicable socket types:: all, only for connection-oriented transports
  48. ZMQ_BINDTODEVICE: Retrieve name of device the socket is bound to
  49. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  50. The 'ZMQ_BINDTODEVICE' option retrieves the name of the device this socket is
  51. bound to, eg. an interface or VRF. If a socket is bound to an interface, only
  52. packets received from that interface are processed by the socket. If device
  53. is a VRF device, then subsequent binds/connects to that socket use addresses
  54. in the VRF routing table.
  55. [horizontal]
  56. Option value type:: character string
  57. Option value unit:: N/A
  58. Default value:: not set
  59. Applicable socket types:: all, when using TCP or UDP transports.
  60. ZMQ_CONNECT_TIMEOUT: Retrieve connect() timeout
  61. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  62. Retrieves how long to wait before timing-out a connect() system call.
  63. The connect() system call normally takes a long time before it returns a
  64. time out error. Setting this option allows the library to time out the call
  65. at an earlier interval.
  66. [horizontal]
  67. Option value type:: int
  68. Option value unit:: milliseconds
  69. Default value:: 0 (disabled)
  70. Applicable socket types:: all, when using TCP transports.
  71. ZMQ_CURVE_PUBLICKEY: Retrieve current CURVE public key
  72. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  73. Retrieves the current long term public key for the socket. You can
  74. provide either a 32 byte buffer, to retrieve the binary key value, or
  75. a 41 byte buffer, to retrieve the key in a printable Z85 format.
  76. NOTE: to fetch a printable key, the buffer must be 41 bytes large
  77. to hold the 40-char key value and one null byte.
  78. [horizontal]
  79. Option value type:: binary data or Z85 text string
  80. Option value size:: 32 or 41
  81. Default value:: null
  82. Applicable socket types:: all, when using TCP transport
  83. ZMQ_CURVE_SECRETKEY: Retrieve current CURVE secret key
  84. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  85. Retrieves the current long term secret key for the socket. You can
  86. provide either a 32 byte buffer, to retrieve the binary key value, or
  87. a 41 byte buffer, to retrieve the key in a printable Z85 format.
  88. NOTE: to fetch a printable key, the buffer must be 41 bytes large
  89. to hold the 40-char key value and one null byte.
  90. [horizontal]
  91. Option value type:: binary data or Z85 text string
  92. Option value size:: 32 or 41
  93. Default value:: null
  94. Applicable socket types:: all, when using TCP transport
  95. ZMQ_CURVE_SERVERKEY: Retrieve current CURVE server key
  96. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  97. Retrieves the current server key for the client socket. You can
  98. provide either a 32 byte buffer, to retrieve the binary key value, or
  99. a 41-byte buffer, to retrieve the key in a printable Z85 format.
  100. NOTE: to fetch a printable key, the buffer must be 41 bytes large
  101. to hold the 40-char key value and one null byte.
  102. [horizontal]
  103. Option value type:: binary data or Z85 text string
  104. Option value size:: 32 or 41
  105. Default value:: null
  106. Applicable socket types:: all, when using TCP transport
  107. ZMQ_EVENTS: Retrieve socket event state
  108. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  109. The 'ZMQ_EVENTS' option shall retrieve the event state for the specified
  110. 'socket'. The returned value is a bit mask constructed by OR'ing a combination
  111. of the following event flags:
  112. *ZMQ_POLLIN*::
  113. Indicates that at least one message may be received from the specified socket
  114. without blocking.
  115. *ZMQ_POLLOUT*::
  116. Indicates that at least one message may be sent to the specified socket without
  117. blocking.
  118. The combination of a file descriptor returned by the 'ZMQ_FD' option being
  119. ready for reading but no actual events returned by a subsequent retrieval of
  120. the 'ZMQ_EVENTS' option is valid; applications should simply ignore this case
  121. and restart their polling operation/event loop.
  122. [horizontal]
  123. Option value type:: int
  124. Option value unit:: N/A (flags)
  125. Default value:: N/A
  126. Applicable socket types:: all
  127. ZMQ_FD: Retrieve file descriptor associated with the socket
  128. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  129. The 'ZMQ_FD' option shall retrieve the file descriptor associated with the
  130. specified 'socket'. The returned file descriptor can be used to integrate the
  131. socket into an existing event loop; the 0MQ library shall signal any pending
  132. events on the socket in an _edge-triggered_ fashion by making the file
  133. descriptor become ready for reading.
  134. NOTE: The ability to read from the returned file descriptor does not
  135. necessarily indicate that messages are available to be read from, or can be
  136. written to, the underlying socket; applications must retrieve the actual event
  137. state with a subsequent retrieval of the 'ZMQ_EVENTS' option.
  138. NOTE: The returned file descriptor is also used internally by the 'zmq_send'
  139. and 'zmq_recv' functions. As the descriptor is edge triggered, applications
  140. must update the state of 'ZMQ_EVENTS' after each invocation of 'zmq_send'
  141. or 'zmq_recv'.To be more explicit: after calling 'zmq_send' the socket may
  142. become readable (and vice versa) without triggering a read event on the
  143. file descriptor.
  144. CAUTION: The returned file descriptor is intended for use with a 'poll' or
  145. similar system call only. Applications must never attempt to read or write data
  146. to it directly, neither should they try to close it.
  147. [horizontal]
  148. Option value type:: int on POSIX systems, SOCKET on Windows
  149. Option value unit:: N/A
  150. Default value:: N/A
  151. Applicable socket types:: all
  152. ZMQ_GSSAPI_PLAINTEXT: Retrieve GSSAPI plaintext or encrypted status
  153. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  154. Returns the 'ZMQ_GSSAPI_PLAINTEXT' option, if any, previously set on the
  155. socket. A value of '1' means that communications will be plaintext. A value
  156. of '0' means communications will be encrypted.
  157. [horizontal]
  158. Option value type:: int
  159. Option value unit:: 0, 1
  160. Default value:: 0 (false)
  161. Applicable socket types:: all, when using TCP or IPC transports
  162. ZMQ_GSSAPI_PRINCIPAL: Retrieve the name of the GSSAPI principal
  163. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  164. The 'ZMQ_GSSAPI_PRINCIPAL' option shall retrieve the principal name set for the
  165. GSSAPI security mechanism. The returned value shall be a NULL-terminated string
  166. and MAY be empty. The returned size SHALL include the terminating null byte.
  167. [horizontal]
  168. Option value type:: NULL-terminated character string
  169. Option value unit:: N/A
  170. Default value:: null string
  171. Applicable socket types:: all, when using TCP or IPC transports
  172. ZMQ_GSSAPI_SERVER: Retrieve current GSSAPI server role
  173. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  174. Returns the 'ZMQ_GSSAPI_SERVER' option, if any, previously set on the socket.
  175. [horizontal]
  176. Option value type:: int
  177. Option value unit:: 0, 1
  178. Default value:: 0 (false)
  179. Applicable socket types:: all, when using TCP or IPC transports
  180. ZMQ_GSSAPI_SERVICE_PRINCIPAL: Retrieve the name of the GSSAPI service principal
  181. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  182. The 'ZMQ_GSSAPI_SERVICE_PRINCIPAL' option shall retrieve the principal name of
  183. the GSSAPI server to which a GSSAPI client socket intends to connect. The
  184. returned value shall be a NULL-terminated string and MAY be empty. The returned
  185. size SHALL include the terminating null byte.
  186. [horizontal]
  187. Option value type:: NULL-terminated character string
  188. Option value unit:: N/A
  189. Default value:: null string
  190. Applicable socket types:: all, when using TCP or IPC transports
  191. ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE: Retrieve nametype for service principal
  192. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  193. Returns the 'ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE' option, if any, previously
  194. set on the socket. A value of 'ZMQ_GSSAPI_NT_HOSTBASED' (0) means the name
  195. specified with 'ZMQ_GSSAPI_SERVICE_PRINCIPAL' is interpreted as a host based
  196. name. A value of 'ZMQ_GSSAPI_NT_USER_NAME' (1) means it is interpreted as
  197. a local user name. A value of 'ZMQ_GSSAPI_NT_KRB5_PRINCIPAL' (2) means it
  198. is interpreted as an unparsed principal name string (valid only with the
  199. krb5 GSSAPI mechanism).
  200. [horizontal]
  201. Option value type:: int
  202. Option value unit:: 0, 1, 2
  203. Default value:: 0 (ZMQ_GSSAPI_NT_HOSTBASED)
  204. Applicable socket types:: all, when using TCP or IPC transports
  205. ZMQ_GSSAPI_PRINCIPAL_NAMETYPE: Retrieve nametype for service principal
  206. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  207. Returns the 'ZMQ_GSSAPI_PRINCIPAL_NAMETYPE' option, if any, previously
  208. set on the socket. A value of 'ZMQ_GSSAPI_NT_HOSTBASED' (0) means the name
  209. specified with 'ZMQ_GSSAPI_PRINCIPAL' is interpreted as a host based
  210. name. A value of 'ZMQ_GSSAPI_NT_USER_NAME' (1) means it is interpreted as
  211. a local user name. A value of 'ZMQ_GSSAPI_NT_KRB5_PRINCIPAL' (2) means it
  212. is interpreted as an unparsed principal name string (valid only with the
  213. krb5 GSSAPI mechanism).
  214. [horizontal]
  215. Option value type:: int
  216. Option value unit:: 0, 1, 2
  217. Default value:: 0 (ZMQ_GSSAPI_NT_HOSTBASED)
  218. Applicable socket types:: all, when using TCP or IPC transports
  219. ZMQ_HANDSHAKE_IVL: Retrieve maximum handshake interval
  220. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  221. The 'ZMQ_HANDSHAKE_IVL' option shall retrieve the maximum handshake interval
  222. for the specified 'socket'. Handshaking is the exchange of socket configuration
  223. information (socket type, routing id, security) that occurs when a connection
  224. is first opened, only for connection-oriented transports. If handshaking does
  225. not complete within the configured time, the connection shall be closed.
  226. The value 0 means no handshake time limit.
  227. [horizontal]
  228. Option value type:: int
  229. Option value unit:: milliseconds
  230. Default value:: 30000
  231. Applicable socket types:: all but ZMQ_STREAM, only for connection-oriented transports
  232. ZMQ_IDENTITY: Retrieve socket identity
  233. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  234. This option name is now deprecated. Use ZMQ_ROUTING_ID instead.
  235. ZMQ_IDENTITY remains as an alias for now.
  236. ZMQ_IMMEDIATE: Retrieve attach-on-connect value
  237. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  238. Retrieve the state of the attach on connect value. If set to `1`, will delay the
  239. attachment of a pipe on connect until the underlying connection has completed.
  240. This will cause the socket to block if there are no other connections, but will
  241. prevent queues from filling on pipes awaiting connection.
  242. [horizontal]
  243. Option value type:: int
  244. Option value unit:: boolean
  245. Default value:: 0 (false)
  246. Applicable socket types:: all, primarily when using TCP/IPC transports.
  247. ZMQ_INVERT_MATCHING: Retrieve inverted filtering status
  248. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  249. Returns the value of the 'ZMQ_INVERT_MATCHING' option. A value of `1`
  250. means the socket uses inverted prefix matching.
  251. On 'PUB' and 'XPUB' sockets, this causes messages to be sent to all
  252. connected sockets 'except' those subscribed to a prefix that matches
  253. the message. On 'SUB' sockets, this causes only incoming messages that
  254. do 'not' match any of the socket's subscriptions to be received by the user.
  255. Whenever 'ZMQ_INVERT_MATCHING' is set to 1 on a 'PUB' socket, all 'SUB'
  256. sockets connecting to it must also have the option set to 1. Failure to
  257. do so will have the 'SUB' sockets reject everything the 'PUB' socket sends
  258. them. 'XSUB' sockets do not need to do this because they do not filter
  259. incoming messages.
  260. [horizontal]
  261. Option value type:: int
  262. Option value unit:: 0,1
  263. Default value:: 0
  264. Applicable socket types:: ZMQ_PUB, ZMQ_XPUB, ZMQ_SUB
  265. ZMQ_IPV4ONLY: Retrieve IPv4-only socket override status
  266. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  267. Retrieve the IPv4-only option for the socket. This option is deprecated.
  268. Please use the ZMQ_IPV6 option.
  269. [horizontal]
  270. Option value type:: int
  271. Option value unit:: boolean
  272. Default value:: 1 (true)
  273. Applicable socket types:: all, when using TCP transports.
  274. ZMQ_IPV6: Retrieve IPv6 socket status
  275. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  276. Retrieve the IPv6 option for the socket. A value of `1` means IPv6 is
  277. enabled on the socket, while `0` means the socket will use only IPv4.
  278. When IPv6 is enabled the socket will connect to, or accept connections
  279. from, both IPv4 and IPv6 hosts.
  280. [horizontal]
  281. Option value type:: int
  282. Option value unit:: boolean
  283. Default value:: 0 (false)
  284. Applicable socket types:: all, when using TCP transports.
  285. ZMQ_LAST_ENDPOINT: Retrieve the last endpoint set
  286. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  287. The 'ZMQ_LAST_ENDPOINT' option shall retrieve the last endpoint bound for
  288. TCP and IPC transports. The returned value will be a string in the form of
  289. a ZMQ DSN. Note that if the TCP host is INADDR_ANY, indicated by a *, then
  290. the returned address will be 0.0.0.0 (for IPv4).
  291. Note: not supported on GNU/Hurd with IPC due to non-working getsockname().
  292. [horizontal]
  293. Option value type:: NULL-terminated character string
  294. Option value unit:: N/A
  295. Default value:: NULL
  296. Applicable socket types:: all, when binding TCP or IPC transports
  297. ZMQ_LINGER: Retrieve linger period for socket shutdown
  298. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  299. The 'ZMQ_LINGER' option shall retrieve the linger period for the specified
  300. 'socket'. The linger period determines how long pending messages which have
  301. yet to be sent to a peer shall linger in memory after a socket is closed with
  302. linkzmq:zmq_close[3], and further affects the termination of the socket's
  303. context with linkzmq:zmq_ctx_term[3]. The following outlines the different
  304. behaviours:
  305. * The default value of '-1' specifies an infinite linger period. Pending
  306. messages shall not be discarded after a call to _zmq_close()_; attempting to
  307. terminate the socket's context with _zmq_ctx_term()_ shall block until all
  308. pending messages have been sent to a peer.
  309. * The value of '0' specifies no linger period. Pending messages shall be
  310. discarded immediately when the socket is closed with _zmq_close()_.
  311. * Positive values specify an upper bound for the linger period in milliseconds.
  312. Pending messages shall not be discarded after a call to _zmq_close()_;
  313. attempting to terminate the socket's context with _zmq_ctx_term()_ shall block
  314. until either all pending messages have been sent to a peer, or the linger
  315. period expires, after which any pending messages shall be discarded.
  316. [horizontal]
  317. Option value type:: int
  318. Option value unit:: milliseconds
  319. Default value:: -1 (infinite)
  320. Applicable socket types:: all
  321. ZMQ_MAXMSGSIZE: Maximum acceptable inbound message size
  322. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  323. The option shall retrieve limit for the inbound messages. If a peer sends
  324. a message larger than ZMQ_MAXMSGSIZE it is disconnected. Value of -1 means
  325. 'no limit'.
  326. [horizontal]
  327. Option value type:: int64_t
  328. Option value unit:: bytes
  329. Default value:: -1
  330. Applicable socket types:: all
  331. ZMQ_MECHANISM: Retrieve current security mechanism
  332. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  333. The 'ZMQ_MECHANISM' option shall retrieve the current security mechanism
  334. for the socket.
  335. [horizontal]
  336. Option value type:: int
  337. Option value unit:: ZMQ_NULL, ZMQ_PLAIN, ZMQ_CURVE, or ZMQ_GSSAPI
  338. Default value:: ZMQ_NULL
  339. Applicable socket types:: all, when using TCP or IPC transports
  340. ZMQ_MULTICAST_HOPS: Maximum network hops for multicast packets
  341. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  342. The option shall retrieve time-to-live used for outbound multicast packets.
  343. The default of 1 means that the multicast packets don't leave the local network.
  344. [horizontal]
  345. Option value type:: int
  346. Option value unit:: network hops
  347. Default value:: 1
  348. Applicable socket types:: all, when using multicast transports
  349. ZMQ_MULTICAST_MAXTPDU: Maximum transport data unit size for multicast packets
  350. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  351. The 'ZMQ_MULTICAST_MAXTPDU' option shall retrieve the maximum transport
  352. data unit size used for outbound multicast packets.
  353. This must be set at or below the minimum Maximum Transmission Unit (MTU) for
  354. all network paths over which multicast reception is required.
  355. [horizontal]
  356. Option value type:: int
  357. Option value unit:: bytes
  358. Default value:: 1500
  359. Applicable socket types:: all, when using multicast transports
  360. ZMQ_PLAIN_PASSWORD: Retrieve current password
  361. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  362. The 'ZMQ_PLAIN_PASSWORD' option shall retrieve the last password set for
  363. the PLAIN security mechanism. The returned value shall be a NULL-terminated
  364. string and MAY be empty. The returned size SHALL include the terminating
  365. null byte.
  366. [horizontal]
  367. Option value type:: NULL-terminated character string
  368. Option value unit:: N/A
  369. Default value:: null string
  370. Applicable socket types:: all, when using TCP or IPC transports
  371. ZMQ_PLAIN_SERVER: Retrieve current PLAIN server role
  372. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  373. Returns the 'ZMQ_PLAIN_SERVER' option, if any, previously set on the socket.
  374. [horizontal]
  375. Option value type:: int
  376. Option value unit:: 0, 1
  377. Default value:: int
  378. Applicable socket types:: all, when using TCP or IPC transports
  379. ZMQ_PLAIN_USERNAME: Retrieve current PLAIN username
  380. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  381. The 'ZMQ_PLAIN_USERNAME' option shall retrieve the last username set for
  382. the PLAIN security mechanism. The returned value shall be a NULL-terminated
  383. string and MAY be empty. The returned size SHALL include the terminating
  384. null byte.
  385. [horizontal]
  386. Option value type:: NULL-terminated character string
  387. Option value unit:: N/A
  388. Default value:: null string
  389. Applicable socket types:: all, when using TCP or IPC transports
  390. ZMQ_USE_FD: Retrieve the pre-allocated socket file descriptor
  391. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  392. The 'ZMQ_USE_FD' option shall retrieve the pre-allocated file
  393. descriptor that has been assigned to a ZMQ socket, if any. -1 shall be
  394. returned if a pre-allocated file descriptor was not set for the socket.
  395. [horizontal]
  396. Option value type:: int
  397. Option value unit:: file descriptor
  398. Default value:: -1
  399. Applicable socket types:: all bound sockets, when using IPC or TCP transport
  400. ZMQ_RATE: Retrieve multicast data rate
  401. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  402. The 'ZMQ_RATE' option shall retrieve the maximum send or receive data rate for
  403. multicast transports using the specified 'socket'.
  404. [horizontal]
  405. Option value type:: int
  406. Option value unit:: kilobits per second
  407. Default value:: 100
  408. Applicable socket types:: all, when using multicast transports
  409. ZMQ_RCVBUF: Retrieve kernel receive buffer size
  410. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  411. The 'ZMQ_RCVBUF' option shall retrieve the underlying kernel receive buffer
  412. size for the specified 'socket'. For details refer to your operating system
  413. documentation for the 'SO_RCVBUF' socket option.
  414. [horizontal]
  415. Option value type:: int
  416. Option value unit:: bytes
  417. Default value:: 8192
  418. Applicable socket types:: all
  419. ZMQ_RCVHWM: Retrieve high water mark for inbound messages
  420. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  421. The 'ZMQ_RCVHWM' option shall return the high water mark for inbound messages on
  422. the specified 'socket'. The high water mark is a hard limit on the maximum
  423. number of outstanding messages 0MQ shall queue in memory for any single peer
  424. that the specified 'socket' is communicating with. A value of zero means no
  425. limit.
  426. If this limit has been reached the socket shall enter an exceptional state and
  427. depending on the socket type, 0MQ shall take appropriate action such as
  428. blocking or dropping sent messages. Refer to the individual socket descriptions
  429. in linkzmq:zmq_socket[3] for details on the exact action taken for each socket
  430. type.
  431. [horizontal]
  432. Option value type:: int
  433. Option value unit:: messages
  434. Default value:: 1000
  435. Applicable socket types:: all
  436. ZMQ_RCVMORE: More message data parts to follow
  437. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  438. The 'ZMQ_RCVMORE' option shall return True (1) if the message part last
  439. received from the 'socket' was a data part with more parts to follow. If there
  440. are no data parts to follow, this option shall return False (0).
  441. Refer to linkzmq:zmq_send[3] and linkzmq:zmq_recv[3] for a detailed description
  442. of multi-part messages.
  443. [horizontal]
  444. Option value type:: int
  445. Option value unit:: boolean
  446. Default value:: N/A
  447. Applicable socket types:: all
  448. ZMQ_RCVTIMEO: Maximum time before a socket operation returns with EAGAIN
  449. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  450. Retrieve the timeout for recv operation on the socket. If the value is `0`,
  451. _zmq_recv(3)_ will return immediately, with a EAGAIN error if there is no
  452. message to receive. If the value is `-1`, it will block until a message is
  453. available. For all other values, it will wait for a message for that amount
  454. of time before returning with an EAGAIN error.
  455. [horizontal]
  456. Option value type:: int
  457. Option value unit:: milliseconds
  458. Default value:: -1 (infinite)
  459. Applicable socket types:: all
  460. ZMQ_RECONNECT_IVL: Retrieve reconnection interval
  461. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  462. The 'ZMQ_RECONNECT_IVL' option shall retrieve the initial reconnection interval
  463. for the specified 'socket'. The reconnection interval is the period 0MQ shall
  464. wait between attempts to reconnect disconnected peers when using
  465. connection-oriented transports. The value -1 means no reconnection.
  466. NOTE: The reconnection interval may be randomized by 0MQ to prevent
  467. reconnection storms in topologies with a large number of peers per socket.
  468. [horizontal]
  469. Option value type:: int
  470. Option value unit:: milliseconds
  471. Default value:: 100
  472. Applicable socket types:: all, only for connection-oriented transports
  473. ZMQ_RECONNECT_IVL_MAX: Retrieve maximum reconnection interval
  474. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  475. The 'ZMQ_RECONNECT_IVL_MAX' option shall retrieve the maximum reconnection
  476. interval for the specified 'socket'. This is the maximum period 0MQ shall wait
  477. between attempts to reconnect. On each reconnect attempt, the previous interval
  478. shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached. This allows for
  479. exponential backoff strategy. Default value means no exponential backoff is
  480. performed and reconnect interval calculations are only based on
  481. ZMQ_RECONNECT_IVL.
  482. NOTE: Values less than ZMQ_RECONNECT_IVL will be ignored.
  483. [horizontal]
  484. Option value type:: int
  485. Option value unit:: milliseconds
  486. Default value:: 0 (only use ZMQ_RECONNECT_IVL)
  487. Applicable socket types:: all, only for connection-oriented transport
  488. ZMQ_RECONNECT_STOP: Retrieve condition where reconnection will stop
  489. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  490. The 'ZMQ_RECONNECT_STOP' option shall retrieve the conditions under which
  491. automatic reconnection will stop.
  492. The 'ZMQ_RECONNECT_STOP_CONN_REFUSED' option will stop reconnection when 0MQ
  493. receives the ECONNREFUSED return code from the connect. This indicates that
  494. there is no code bound to the specified endpoint.
  495. [horizontal]
  496. Option value type:: int
  497. Option value unit:: 'ZMQ_RECONNECT_STOP_CONN_REFUSED'
  498. Default value:: 0
  499. Applicable socket types:: all, only for connection-oriented transports
  500. ZMQ_RECOVERY_IVL: Get multicast recovery interval
  501. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  502. The 'ZMQ_RECOVERY_IVL' option shall retrieve the recovery interval for
  503. multicast transports using the specified 'socket'. The recovery interval
  504. determines the maximum time in milliseconds that a receiver can be absent from a
  505. multicast group before unrecoverable data loss will occur.
  506. [horizontal]
  507. Option value type:: int
  508. Option value unit:: milliseconds
  509. Default value:: 10000
  510. Applicable socket types:: all, when using multicast transports
  511. ZMQ_ROUTING_ID: Retrieve socket routing id
  512. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  513. The 'ZMQ_ROUTING_ID' option shall retrieve the routing id of the specified 'socket'.
  514. Routing ids are used only by the request/reply pattern. Specifically, it can be used
  515. in tandem with ROUTER socket to route messages to the peer with a specific
  516. routing id.
  517. A routing id must be at least one byte and at most 255 bytes long. Identities
  518. starting with a zero byte are reserved for use by the 0MQ infrastructure.
  519. [horizontal]
  520. Option value type:: binary data
  521. Option value unit:: N/A
  522. Default value:: NULL
  523. Applicable socket types:: ZMQ_REP, ZMQ_REQ, ZMQ_ROUTER, ZMQ_DEALER.
  524. ZMQ_SNDBUF: Retrieve kernel transmit buffer size
  525. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  526. The 'ZMQ_SNDBUF' option shall retrieve the underlying kernel transmit buffer
  527. size for the specified 'socket'. For details refer to your operating system
  528. documentation for the 'SO_SNDBUF' socket option.
  529. [horizontal]
  530. Option value type:: int
  531. Option value unit:: bytes
  532. Default value:: 8192
  533. Applicable socket types:: all
  534. ZMQ_SNDHWM: Retrieves high water mark for outbound messages
  535. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  536. The 'ZMQ_SNDHWM' option shall return the high water mark for outbound messages
  537. on the specified 'socket'. The high water mark is a hard limit on the maximum
  538. number of outstanding messages 0MQ shall queue in memory for any single peer
  539. that the specified 'socket' is communicating with. A value of zero means no
  540. limit.
  541. If this limit has been reached the socket shall enter an exceptional state and
  542. depending on the socket type, 0MQ shall take appropriate action such as
  543. blocking or dropping sent messages. Refer to the individual socket descriptions
  544. in linkzmq:zmq_socket[3] for details on the exact action taken for each socket
  545. type.
  546. [horizontal]
  547. Option value type:: int
  548. Option value unit:: messages
  549. Default value:: 1000
  550. Applicable socket types:: all
  551. ZMQ_SNDTIMEO: Maximum time before a socket operation returns with EAGAIN
  552. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  553. Retrieve the timeout for send operation on the socket. If the value is `0`,
  554. _zmq_send(3)_ will return immediately, with a EAGAIN error if the message
  555. cannot be sent. If the value is `-1`, it will block until the message is sent.
  556. For all other values, it will try to send the message for that amount of time
  557. before returning with an EAGAIN error.
  558. [horizontal]
  559. Option value type:: int
  560. Option value unit:: milliseconds
  561. Default value:: -1 (infinite)
  562. Applicable socket types:: all
  563. ZMQ_SOCKS_PROXY: Retrieve SOCKS5 proxy address
  564. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  565. The 'ZMQ_SOCKS_PROXY' option shall retrieve the SOCKS5 proxy address in string
  566. format. The returned value shall be a NULL-terminated string and MAY be empty.
  567. The returned size SHALL include the terminating null byte.
  568. [horizontal]
  569. Option value type:: NULL-terminated character string
  570. Option value unit:: N/A
  571. Default value:: null string
  572. Applicable socket types:: all, when using TCP transports
  573. ZMQ_TCP_KEEPALIVE: Override SO_KEEPALIVE socket option
  574. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  575. Override 'SO_KEEPALIVE' socket option(where supported by OS).
  576. The default value of `-1` means to skip any overrides and leave it to OS default.
  577. [horizontal]
  578. Option value type:: int
  579. Option value unit:: -1,0,1
  580. Default value:: -1 (leave to OS default)
  581. Applicable socket types:: all, when using TCP transports.
  582. ZMQ_TCP_KEEPALIVE_CNT: Override TCP_KEEPCNT socket option
  583. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  584. Override 'TCP_KEEPCNT' socket option(where supported by OS).
  585. The default value of `-1` means to skip any overrides and leave it to OS default.
  586. [horizontal]
  587. Option value type:: int
  588. Option value unit:: -1,>0
  589. Default value:: -1 (leave to OS default)
  590. Applicable socket types:: all, when using TCP transports.
  591. ZMQ_TCP_KEEPALIVE_IDLE: Override TCP_KEEPIDLE (or TCP_KEEPALIVE on some OS)
  592. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  593. Override 'TCP_KEEPIDLE'(or 'TCP_KEEPALIVE' on some OS) socket option (where
  594. supported by OS). The default value of `-1` means to skip any overrides and
  595. leave it to OS default.
  596. [horizontal]
  597. Option value type:: int
  598. Option value unit:: -1,>0
  599. Default value:: -1 (leave to OS default)
  600. Applicable socket types:: all, when using TCP transports.
  601. ZMQ_TCP_KEEPALIVE_INTVL: Override TCP_KEEPINTVL socket option
  602. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  603. Override 'TCP_KEEPINTVL' socket option(where supported by OS).
  604. The default value of `-1` means to skip any overrides and leave it to OS default.
  605. [horizontal]
  606. Option value type:: int
  607. Option value unit:: -1,>0
  608. Default value:: -1 (leave to OS default)
  609. Applicable socket types:: all, when using TCP transports.
  610. ZMQ_TCP_MAXRT: Retrieve Max TCP Retransmit Timeout
  611. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  612. On OSes where it is supported, retrieves how long before an unacknowledged TCP
  613. retransmit times out. The system normally attempts many TCP retransmits
  614. following an exponential backoff strategy. This means that after a network
  615. outage, it may take a long time before the session can be re-established.
  616. Setting this option allows the timeout to happen at a shorter interval.
  617. [horizontal]
  618. Option value type:: int
  619. Option value unit:: milliseconds
  620. Default value:: 0 (leave to OS default)
  621. Applicable socket types:: all, when using TCP transports.
  622. ZMQ_THREAD_SAFE: Retrieve socket thread safety
  623. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  624. The 'ZMQ_THREAD_SAFE' option shall retrieve a boolean value indicating whether
  625. or not the socket is threadsafe. See linkzmq:zmq_socket[3] for which sockets are
  626. thread-safe.
  627. [horizontal]
  628. Option value type:: int
  629. Option value unit:: boolean
  630. Applicable socket types:: all
  631. ZMQ_TOS: Retrieve the Type-of-Service socket override status
  632. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  633. Retrieve the IP_TOS option for the socket.
  634. [horizontal]
  635. Option value type:: int
  636. Option value unit:: >0
  637. Default value:: 0
  638. Applicable socket types:: all, only for connection-oriented transports
  639. ZMQ_TYPE: Retrieve socket type
  640. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  641. The 'ZMQ_TYPE' option shall retrieve the socket type for the specified
  642. 'socket'. The socket type is specified at socket creation time and
  643. cannot be modified afterwards.
  644. [horizontal]
  645. Option value type:: int
  646. Option value unit:: N/A
  647. Default value:: N/A
  648. Applicable socket types:: all
  649. ZMQ_ZAP_DOMAIN: Retrieve RFC 27 authentication domain
  650. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  651. The 'ZMQ_ZAP_DOMAIN' option shall retrieve the last ZAP domain set for
  652. the socket. The returned value shall be a NULL-terminated string and MAY
  653. be empty. An empty string means that ZAP authentication is disabled.
  654. The returned size SHALL include the terminating null byte.
  655. [horizontal]
  656. Option value type:: character string
  657. Option value unit:: N/A
  658. Default value:: not set
  659. Applicable socket types:: all, when using TCP transport
  660. ZMQ_ZAP_ENFORCE_DOMAIN: Retrieve ZAP domain handling mode
  661. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  662. The 'ZMQ_ZAP_ENFORCE_DOMAIN' option shall retrieve the flag that determines
  663. whether a ZAP domain is strictly required or not.
  664. [horizontal]
  665. Option value type:: int
  666. Option value unit:: 0, 1
  667. Default value:: 0
  668. Applicable socket types:: all, when using ZAP
  669. ZMQ_VMCI_BUFFER_SIZE: Retrieve buffer size of the VMCI socket
  670. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  671. The `ZMQ_VMCI_BUFFER_SIZE` option shall retrieve the size of the underlying
  672. buffer for the socket. Used during negotiation before the connection is established.
  673. [horizontal]
  674. Option value type:: uint64_t
  675. Option value unit:: bytes
  676. Default value:: 65546
  677. Applicable socket types:: all, when using VMCI transport
  678. ZMQ_VMCI_BUFFER_MIN_SIZE: Retrieve min buffer size of the VMCI socket
  679. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  680. The `ZMQ_VMCI_BUFFER_MIN_SIZE` option shall retrieve the min size of the underlying
  681. buffer for the socket. Used during negotiation before the connection is established.
  682. [horizontal]
  683. Option value type:: uint64_t
  684. Option value unit:: bytes
  685. Default value:: 128
  686. Applicable socket types:: all, when using VMCI transport
  687. ZMQ_VMCI_BUFFER_MAX_SIZE: Retrieve max buffer size of the VMCI socket
  688. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  689. The `ZMQ_VMCI_BUFFER_MAX_SIZE` option shall retrieve the max size of the underlying
  690. buffer for the socket. Used during negotiation before the connection is established.
  691. [horizontal]
  692. Option value type:: uint64_t
  693. Option value unit:: bytes
  694. Default value:: 262144
  695. Applicable socket types:: all, when using VMCI transport
  696. ZMQ_VMCI_CONNECT_TIMEOUT: Retrieve connection timeout of the VMCI socket
  697. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  698. The `ZMQ_VMCI_CONNECT_TIMEOUT` option shall retrieve connection timeout
  699. for the socket.
  700. [horizontal]
  701. Option value type:: int
  702. Option value unit:: milliseconds
  703. Default value:: -1
  704. Applicable socket types:: all, when using VMCI transport
  705. ZMQ_MULTICAST_LOOP: Retrieve multicast local loopback configuration
  706. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  707. Retrieve the current multicast loopback configuration. A value of `1`
  708. means that the multicast packets sent on this socket will be looped
  709. back to local listening interface.
  710. [horizontal]
  711. Option value type:: int
  712. Option value unit:: 0, 1
  713. Default value:: 1
  714. Applicable socket types:: ZMQ_RADIO, when using UDP multicast transport
  715. ZMQ_ROUTER_NOTIFY: Retrieve router socket notification settings
  716. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  717. Retrieve the current notification settings of a router socket. The returned
  718. value is a bitmask composed of ZMQ_NOTIFY_CONNECT and ZMQ_NOTIFY_DISCONNECT
  719. flags, meaning connect and disconnect notifications are enabled, respectively.
  720. A value of '0' means the notifications are off.
  721. NOTE: in DRAFT state, not yet available in stable releases.
  722. [horizontal]
  723. Option value type:: int
  724. Option value unit:: 0, ZMQ_NOTIFY_CONNECT, ZMQ_NOTIFY_DISCONNECT, ZMQ_NOTIFY_CONNECT | ZMQ_NOTIFY_DISCONNECT
  725. Default value:: 0
  726. Applicable socket types:: ZMQ_ROUTER
  727. ZMQ_IN_BATCH_SIZE: Maximal receive batch size
  728. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  729. Gets the maximal amount of messages that can be received in a single
  730. 'recv' system call.
  731. Cannot be zero.
  732. NOTE: in DRAFT state, not yet available in stable releases.
  733. [horizontal]
  734. Option value type:: int
  735. Option value unit:: messages
  736. Default value:: 8192
  737. Applicable socket types:: All, when using TCP, IPC, PGM or NORM transport.
  738. ZMQ_OUT_BATCH_SIZE: Maximal send batch size
  739. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  740. Gets the maximal amount of messages that can be sent in a single
  741. 'send' system call.
  742. Cannot be zero.
  743. NOTE: in DRAFT state, not yet available in stable releases.
  744. [horizontal]
  745. Option value type:: int
  746. Option value unit:: messages
  747. Default value:: 8192
  748. Applicable socket types:: All, when using TCP, IPC, PGM or NORM transport.
  749. RETURN VALUE
  750. ------------
  751. The _zmq_getsockopt()_ function shall return zero if successful. Otherwise it
  752. shall return `-1` and set 'errno' to one of the values defined below.
  753. ERRORS
  754. ------
  755. *EINVAL*::
  756. The requested option _option_name_ is unknown, or the requested _option_len_ or
  757. _option_value_ is invalid, or the size of the buffer pointed to by
  758. _option_value_, as specified by _option_len_, is insufficient for storing the
  759. option value.
  760. *ETERM*::
  761. The 0MQ 'context' associated with the specified 'socket' was terminated.
  762. *ENOTSOCK*::
  763. The provided 'socket' was invalid.
  764. *EINTR*::
  765. The operation was interrupted by delivery of a signal.
  766. EXAMPLE
  767. -------
  768. .Retrieving the high water mark for outgoing messages
  769. ----
  770. /* Retrieve high water mark into sndhwm */
  771. int sndhwm;
  772. size_t sndhwm_size = sizeof (sndhwm);
  773. rc = zmq_getsockopt (socket, ZMQ_SNDHWM, &sndhwm, &sndhwm_size);
  774. assert (rc == 0);
  775. ----
  776. SEE ALSO
  777. --------
  778. linkzmq:zmq_setsockopt[3]
  779. linkzmq:zmq_socket[3]
  780. linkzmq:zmq[7]
  781. AUTHORS
  782. -------
  783. This page was written by the 0MQ community. To make a change please
  784. read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.