zmq_setsockopt(3)
=================
NAME
----
zmq_setsockopt - set 0MQ socket options
SYNOPSIS
--------
*int zmq_setsockopt (void '*socket', int 'option_name', const void '*option_value', size_t 'option_len');*
Caution: All options, with the exception of ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE,
ZMQ_LINGER, ZMQ_ROUTER_MANDATORY, ZMQ_PROBE_ROUTER, ZMQ_XPUB_VERBOSE,
ZMQ_REQ_CORRELATE, and ZMQ_REQ_RELAXED, only take effect for subsequent socket
bind/connects.
Specifically, security options take effect for subsequent bind/connect calls,
and can be changed at any time to affect subsequent binds and/or connects.
DESCRIPTION
-----------
The _zmq_setsockopt()_ function shall set the option specified by the
'option_name' argument to the value pointed to by the 'option_value' argument
for the 0MQ socket pointed to by the 'socket' argument. The 'option_len'
argument is the size of the option value in bytes.
The following socket options can be set with the _zmq_setsockopt()_ function:
ZMQ_SNDHWM: Set high water mark for outbound messages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_SNDHWM' option shall set 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. A value of zero means no
limit.
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.
NOTE: 0MQ does not guarantee that the socket will accept as many as ZMQ_SNDHWM
messages, and the actual limit may be as much as 60-70% lower depending on the
flow of messages on the socket.
[horizontal]
Option value type:: int
Option value unit:: messages
Default value:: 1000
Applicable socket types:: all
ZMQ_RCVHWM: Set high water mark for inbound messages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_RCVHWM' option shall set 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. A value of zero means no
limit.
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: Set I/O thread affinity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_AFFINITY' option shall set 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_SUBSCRIBE: Establish message filter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_SUBSCRIBE' option shall establish a new message filter on a 'ZMQ_SUB'
socket. Newly created 'ZMQ_SUB' sockets shall filter out all incoming messages,
therefore you should call this option to establish an initial message filter.
An empty 'option_value' of length zero shall subscribe to all incoming
messages. A non-empty 'option_value' shall subscribe to all messages beginning
with the specified prefix. Multiple filters may be attached to a single
'ZMQ_SUB' socket, in which case a message shall be accepted if it matches at
least one filter.
[horizontal]
Option value type:: binary data
Option value unit:: N/A
Default value:: N/A
Applicable socket types:: ZMQ_SUB
ZMQ_UNSUBSCRIBE: Remove message filter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_UNSUBSCRIBE' option shall remove an existing message filter on a
'ZMQ_SUB' socket. The filter specified must match an existing filter previously
established with the 'ZMQ_SUBSCRIBE' option. If the socket has several
instances of the same filter attached the 'ZMQ_UNSUBSCRIBE' option shall remove
only one instance, leaving the rest in place and functional.
[horizontal]
Option value type:: binary data
Option value unit:: N/A
Default value:: N/A
Applicable socket types:: ZMQ_SUB
ZMQ_IDENTITY: Set socket identity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_IDENTITY' option shall set the identity of the specified 'socket'
when connecting to a ROUTER socket. The identity should be from 1 to 255
bytes long and MAY NOT start with binary zero.
If two clients use the same identity when connecting to a ROUTER, the
ROUTER socket shall accept only the first such client and reject the
others.
[horizontal]
Option value type:: binary data
Option value unit:: N/A
Default value:: NULL
Applicable socket types:: ZMQ_REQ, ZMQ_REP, ZMQ_ROUTER, ZMQ_DEALER.
ZMQ_RATE: Set multicast data rate
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_RATE' option shall set the maximum send or receive data rate for
multicast transports such as linkzmq:zmq_pgm[7] 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: Set multicast recovery interval
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_RECOVERY_IVL' option shall set 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.
CAUTION: Exercise care when setting large recovery intervals as the data
needed for recovery will be held in memory. For example, a 1 minute recovery
interval at a data rate of 1Gbps requires a 7GB in-memory buffer.
[horizontal]
Option value type:: int
Option value unit:: milliseconds
Default value:: 10000
Applicable socket types:: all, when using multicast transports
ZMQ_SNDBUF: Set kernel transmit buffer size
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_SNDBUF' option shall set the underlying kernel transmit buffer size
for the 'socket' to the specified size in bytes. A value of zero means leave
the OS default unchanged. For details please 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: Set kernel receive buffer size
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_RCVBUF' option shall set the underlying kernel receive buffer size for
the 'socket' to the specified size in bytes. A value of zero means leave the
OS default unchanged. 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: Set linger period for socket shutdown
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_LINGER' option shall set the linger period for the specified 'socket'
没有合适的资源?快使用搜索试试~ 我知道了~
ECC加密证书 czmq和zmq和libsodium的库及demo
共1694个文件
h:306个
obj:260个
c:198个
需积分: 50 39 下载量 71 浏览量
2015-08-12
17:34:28
上传
评论
收藏 24.76MB RAR 举报
温馨提示
辛苦用VS2008编译了czmq和zmq和libsodium三个库的工程,写有测试demo,个人感觉很好用的加密算法ECC。有需要的可以下载去学习下。
资源推荐
资源详情
资源评论
收起资源包目录
ECC加密证书 czmq和zmq和libsodium的库及demo (1694个子文件)
zmq_setsockopt.3 33KB
zmq_getsockopt.3 28KB
zmq_socket.3 22KB
zsockopt.3 18KB
zmsg.3 14KB
zhash.3 13KB
zfile.3 10KB
zauth.3 9KB
zmq_socket_monitor.3 9KB
zlist.3 8KB
zsocket.3 8KB
zframe.3 8KB
zsys.3 8KB
zbeacon.3 7KB
zctx.3 7KB
zconfig.3 7KB
zthread.3 6KB
zcert.3 6KB
zchunk.3 6KB
zcertstore.3 6KB
zmq_poll.3 6KB
zloop.3 6KB
zstr.3 6KB
zdir.3 6KB
zmq_msg_send.3 6KB
zmq_sendmsg.3 6KB
zrex.3 6KB
zmq_msg_recv.3 5KB
zproxy.3 5KB
zmq_recvmsg.3 5KB
zmq_connect.3 5KB
zmq_bind.3 5KB
zpoller.3 5KB
zmq_send_const.3 5KB
zmonitor.3 5KB
zmq_send.3 5KB
zmq_proxy.3 4KB
zmq_proxy_steerable.3 4KB
zmq_recv.3 4KB
zdigest.3 4KB
zlog.3 4KB
zuuid.3 4KB
zdir_patch.3 4KB
zmq_msg_init_data.3 4KB
zmq_ctx_term.3 4KB
zclock.3 3KB
zmq_ctx_set.3 3KB
zmq_ctx_destroy.3 3KB
zmq_term.3 3KB
zmutex.3 3KB
zmq_msg_init_size.3 3KB
zmq_msg_copy.3 3KB
zmq_msg_get.3 3KB
zmq_disconnect.3 3KB
zmq_msg_init.3 3KB
zmq_unbind.3 3KB
zmq_ctx_get.3 3KB
zmq_msg_close.3 3KB
zmq_msg_more.3 3KB
zmq_close.3 3KB
zmq_msg_move.3 3KB
zmq_z85_encode.3 2KB
zmq_errno.3 2KB
zmq_curve_keypair.3 2KB
zmq_init.3 2KB
zmq_version.3 2KB
zmq_strerror.3 2KB
zmq_z85_decode.3 2KB
zmq_msg_size.3 2KB
zmq_msg_data.3 2KB
zmq_ctx_new.3 2KB
zmq_msg_set.3 2KB
czmq.7 28KB
zmq.7 9KB
zmq_pgm.7 8KB
zmq_epgm.7 8KB
zmq_ipc.7 5KB
zmq_tcp.7 5KB
zmq_curve.7 4KB
zmq_inproc.7 4KB
zmq_plain.7 2KB
zmq_null.7 2KB
configure.ac 16KB
configure.ac 10KB
Makefile.am 11KB
Makefile.am 4KB
Makefile.am 4KB
Makefile.am 4KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 889B
Makefile.am 667B
Makefile.am 205B
Makefile.am 196B
共 1694 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17
资源评论
dahanxu1988
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功