zmq_getsockopt(3)
=================
NAME
----
zmq_getsockopt - get 0MQ socket options
SYNOPSIS
--------
*int zmq_getsockopt (void '*socket', int 'option_name', void '*option_value', size_t '*option_len');*
DESCRIPTION
-----------
The _zmq_getsockopt()_ function shall retrieve the value for the option
specified by the 'option_name' argument for the 0MQ socket pointed to by the
'socket' argument, and store it in the buffer pointed to by the 'option_value'
argument. The 'option_len' argument is the size in bytes of the buffer pointed
to by 'option_value'; upon successful completion _zmq_getsockopt()_ shall
modify the 'option_len' argument to indicate the actual size of the option
value stored in the buffer.
The following options can be retrieved with the _zmq_getsockopt()_ function:
ZMQ_TYPE: Retrieve socket type
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_TYPE' option shall retrieve the socket type for the specified
'socket'. The socket type is specified at socket creation time and
cannot be modified afterwards.
[horizontal]
Option value type:: int
Option value unit:: N/A
Default value:: N/A
Applicable socket types:: all
ZMQ_RCVMORE: More message data parts to follow
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_RCVMORE' option shall return True (1) if the message part last
received from the 'socket' was a data part with more parts to follow. If there
are no data parts to follow, this option shall return False (0).
Refer to linkzmq:zmq_send[3] and linkzmq:zmq_recv[3] for a detailed description
of multi-part messages.
[horizontal]
Option value type:: int
Option value unit:: boolean
Default value:: N/A
Applicable socket types:: all
ZMQ_SNDHWM: Retrieves high water mark for outbound messages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_SNDHWM' option shall return the high water mark for outbound messages
on the specified 'socket'. The high water mark is a hard limit on the maximum
number of outstanding messages 0MQ shall queue in memory for any single peer
that the specified 'socket' is communicating with.
If this limit has been reached the socket shall enter an exceptional state and
depending on the socket type, 0MQ shall take appropriate action such as
blocking or dropping sent messages. Refer to the individual socket descriptions
in linkzmq:zmq_socket[3] for details on the exact action taken for each socket
type.
[horizontal]
Option value type:: int
Option value unit:: messages
Default value:: 1000
Applicable socket types:: all
ZMQ_RCVHWM: Retrieve high water mark for inbound messages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_RCVHWM' option shall return the high water mark for inbound messages on
the specified 'socket'. The high water mark is a hard limit on the maximum
number of outstanding messages 0MQ shall queue in memory for any single peer
that the specified 'socket' is communicating with.
If this limit has been reached the socket shall enter an exceptional state and
depending on the socket type, 0MQ shall take appropriate action such as
blocking or dropping sent messages. Refer to the individual socket descriptions
in linkzmq:zmq_socket[3] for details on the exact action taken for each socket
type.
[horizontal]
Option value type:: int
Option value unit:: messages
Default value:: 1000
Applicable socket types:: all
ZMQ_AFFINITY: Retrieve I/O thread affinity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_AFFINITY' option shall retrieve the I/O thread affinity for newly
created connections on the specified 'socket'.
Affinity determines which threads from the 0MQ I/O thread pool associated with
the socket's _context_ shall handle newly created connections. A value of zero
specifies no affinity, meaning that work shall be distributed fairly among all
0MQ I/O threads in the thread pool. For non-zero values, the lowest bit
corresponds to thread 1, second lowest bit to thread 2 and so on. For example,
a value of 3 specifies that subsequent connections on 'socket' shall be handled
exclusively by I/O threads 1 and 2.
See also linkzmq:zmq_init[3] for details on allocating the number of I/O
threads for a specific _context_.
[horizontal]
Option value type:: uint64_t
Option value unit:: N/A (bitmap)
Default value:: 0
Applicable socket types:: N/A
ZMQ_IDENTITY: Set socket identity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_IDENTITY' option shall retrieve the identity of the specified 'socket'.
Socket identity is used only by request/reply pattern. Namely, it can be used
in tandem with ROUTER socket to route messages to the peer with specific
identity.
Identity should be at least one byte and at most 255 bytes long. Identities
starting with binary zero are reserved for use by 0MQ infrastructure.
[horizontal]
Option value type:: binary data
Option value unit:: N/A
Default value:: NULL
Applicable socket types:: all
ZMQ_RATE: Retrieve multicast data rate
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_RATE' option shall retrieve the maximum send or receive data rate for
multicast transports using the specified 'socket'.
[horizontal]
Option value type:: int
Option value unit:: kilobits per second
Default value:: 100
Applicable socket types:: all, when using multicast transports
ZMQ_RECOVERY_IVL: Get multicast recovery interval
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_RECOVERY_IVL' option shall retrieve the recovery interval for
multicast transports using the specified 'socket'. The recovery interval
determines the maximum time in milliseconds that a receiver can be absent from a
multicast group before unrecoverable data loss will occur.
[horizontal]
Option value type:: int
Option value unit:: milliseconds
Default value:: 10000
Applicable socket types:: all, when using multicast transports
ZMQ_SNDBUF: Retrieve kernel transmit buffer size
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_SNDBUF' option shall retrieve the underlying kernel transmit buffer
size for the specified 'socket'. A value of zero means that the OS default is
in effect. For details refer to your operating system documentation for the
'SO_SNDBUF' socket option.
[horizontal]
Option value type:: int
Option value unit:: bytes
Default value:: 0
Applicable socket types:: all
ZMQ_RCVBUF: Retrieve kernel receive buffer size
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_RCVBUF' option shall retrieve the underlying kernel receive buffer
size for the specified 'socket'. A value of zero means that the OS default is
in effect. For details refer to your operating system documentation for the
'SO_RCVBUF' socket option.
[horizontal]
Option value type:: int
Option value unit:: bytes
Default value:: 0
Applicable socket types:: all
ZMQ_LINGER: Retrieve linger period for socket shutdown
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_LINGER' option shall retrieve the linger period for the specified
'socket'. The linger period determines how long pending messages which have
yet to be sent to a peer shall linger in memory after a socket is closed with
linkzmq:zmq_close[3], and further affects the termination of the socket's
context with linkzmq:zmq_term[3]. The following outlines the different
behaviours:
* The default value of '-1' specifies an infinite linger period. Pending
messages shall not be discarded after a call to _zmq_close()_; attempting to
terminate the socket's context with _zmq_term()_ shall block until all
pending messages have been sent to a peer.
* The value of '0' specifies no linger period. Pending messages shall be
discarded immediately when the socket is closed with _zmq_close()_.
* Positive values specify an upper bound for the linger period in milliseconds.
Pending messages shall not be discarded after a call to _zmq_close()_;
attempting to terminate the socket's context with _zmq_term()_ shall block
until either all pending messages have been sent to a peer, or the linger
period expires, after which any pending m
没有合适的资源?快使用搜索试试~ 我知道了~
zeromq-3.2.5.tar.gz
5星 · 超过95%的资源 需积分: 16 72 下载量 135 浏览量
2017-02-16
21:39:25
上传
评论
收藏 1.99MB GZ 举报
温馨提示
共375个文件
cpp:87个
hpp:83个
html:43个
ZeroMQ是一个网络通讯库,其主要用来为分布式应用程序开发提供进程间通信(此处的进程既可以是同一台机器上的两个进程也可以是不同机器上的两个进程)。ZeroMQ的特点在于灵活的通信手段和丰富的连接模型,并且它可以在Linux Mac OS X,Windows等多种操作系统上工作,也支持由多种语言进行访问。
资源推荐
资源详情
资源评论
收起资源包目录
zeromq-3.2.5.tar.gz (375个子文件)
zmq_getsockopt.3 23KB
zmq_setsockopt.3 23KB
zmq_socket.3 19KB
zmq_socket_monitor.3 10KB
zmq_poll.3 7KB
zmq_msg_send.3 6KB
zmq_sendmsg.3 6KB
zmq_msg_recv.3 6KB
zmq_recvmsg.3 6KB
zmq_bind.3 5KB
zmq_connect.3 5KB
zmq_send.3 5KB
zmq_recv.3 5KB
zmq_proxy.3 4KB
zmq_msg_init_data.3 4KB
zmq_term.3 3KB
zmq_ctx_destroy.3 3KB
zmq_disconnect.3 3KB
zmq_msg_init_size.3 3KB
zmq_msg_copy.3 3KB
zmq_unbind.3 3KB
zmq_ctx_set.3 3KB
zmq_msg_init.3 3KB
zmq_msg_get.3 3KB
zmq_close.3 3KB
zmq_msg_close.3 3KB
zmq_msg_move.3 3KB
zmq_msg_more.3 3KB
zmq_errno.3 3KB
zmq_ctx_get.3 3KB
zmq_init.3 3KB
zmq_version.3 2KB
zmq_msg_size.3 2KB
zmq_strerror.3 2KB
zmq_msg_data.3 2KB
zmq_ctx_new.3 2KB
zmq_msg_set.3 2KB
zmq.7 9KB
zmq_pgm.7 8KB
zmq_epgm.7 8KB
zmq_tcp.7 5KB
zmq_ipc.7 4KB
zmq_inproc.7 4KB
Makefile.am 3KB
Makefile.am 2KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 667B
Makefile.am 196B
AUTHORS 4KB
ChangeLog 938KB
compile 7KB
asciidoc.conf 1KB
configure 679KB
COPYING 34KB
socket_base.cpp 35KB
zmq.cpp 29KB
pgm_socket.cpp 22KB
tcp_address.cpp 17KB
stream_engine.cpp 17KB
options.cpp 14KB
session_base.cpp 14KB
mtrie.cpp 13KB
signaler.cpp 12KB
pipe.cpp 12KB
trie.cpp 10KB
router.cpp 10KB
ctx.cpp 9KB
err.cpp 9KB
test_monitor.cpp 9KB
tcp_connecter.cpp 8KB
object.cpp 8KB
tcp_listener.cpp 8KB
pgm_receiver.cpp 8KB
test_connect_delay.cpp 7KB
msg.cpp 7KB
ipc_connecter.cpp 7KB
xsub.cpp 7KB
inproc_thr.cpp 6KB
pgm_sender.cpp 6KB
inproc_lat.cpp 6KB
select.cpp 6KB
ipc_listener.cpp 5KB
xpub.cpp 5KB
dist.cpp 5KB
own.cpp 5KB
devpoll.cpp 5KB
kqueue.cpp 5KB
proxy.cpp 5KB
decoder.cpp 5KB
req.cpp 5KB
epoll.cpp 5KB
v1_decoder.cpp 5KB
poll.cpp 5KB
test_reqrep_device.cpp 4KB
clock.cpp 4KB
test_disconnect_inproc.cpp 4KB
tcp.cpp 4KB
fq.cpp 4KB
共 375 条
- 1
- 2
- 3
- 4
资源评论
- wswuchu2018-04-20挺不错的..
- basecoding2018-07-06谢谢,可以用呢
大风起兮~
- 粉丝: 16
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功