ZeroMQ 官方地址 :http://api.zeromq.org/4-0:zmq_init
zmq_init(3) ØMQ Manual - ØMQ/3.2.5
Name
zmq_init - 初始化ZMQ環境上下文
Synopsis
void *zmq_init (int io_threads);
Description
zmq_init()函數初始化一個ZMQ環境上下文(context)。
io_threads參數指定這個ZMQ環境上下文中進行I/O操作的線程池的大小。如果你的應用程序只使用inproc方式進行消息傳輸,你可以把這個參數設置為0,否則至少設置為1。
Thread safety
ZMQ環境上下文是線程安全的,可以按需要設置盡可能多的被共享,而不需要在調用端進行加鎖。
這個函數已經被棄用,而被zmq_ctx_new(3)取代。
Return value
函數zmq_init()執行成功返回一個不透明的context句柄。否則返回NULL並且設置errno為下列指定的值。
Errors
EINVAL
io_threads參數指定的值不可用。
See also
zmq(7) zmq_term(3)
Authors
This ØMQ manual page was written by Martin Sustrik <sustrik@250bpm.com> and Martin Lucina
<mato@kotelna.sk>.
Web site design and content is copyright (c) 2007-2012 iMatix Corporation. Contact us for professional support. Site content licensed under the Creative Commons Attribution-Share Alike 3.0 License. ØMQ is copyright (c) Copyright (c) 2007-2012 iMatix Corporation and Contributors. ØMQ is free software licensed under the LGPL. ØMQ, ZeroMQ, and 0MQ are trademarks of iMatix Corporation. Terms of Use — Privacy
Policy
更多 ZeroMQ API :http://www.cnblogs.com/fengbohello/p/4230135.html
翻譯:風波
mail : fengbohello@qq.com