ZeroMQ API directory :http://www.cnblogs.com/fengbohello/p/4230135.html
—————————————————————————————————————
ZeroMQ official address:http://api.zeromq.org/4-2:zmq-inproc
Zmq_inproc (7) ØMQ Manual-ømq/4.2.0
Name
ZMQ_INPROC–ØMQ Local in-process (inter-thread) transfer
Synopsis
In-process transport means that data is transferred through memory between threads that share ZMQ context.
I/O threads are not required when transferring using the InProc method. So, if you are using ZMQ context for in-process messaging, you can initialize this context for the I/O thread to be 0. See Zmq_init (3) for more details.
Addressing
A ZMQ endpoint includes transport://followed by an address (for example: inproc://someaddress). The transport indicates the underlying protocol to use. Address indicates the transport addresses to connect to.
For in-process transport, the means of transmission is inproc,address defined below.
Assign an address to a socket
When assigning a local address to a socket using the Zmq_bind () function, the endpoint must be an arbitrary, unique string used to create a file. This file name must be unique on the ZMQ context associated with the socket and cannot be longer than 256 bytes. There are no restrictions on the format of this file name.
Connect a socket
When you use the Zmq_connect () function to connect to a socket that uses INPROC transport, the endpoint must be a string that uniquely represents a file name, as the file name used to connect. When the file name is connected, it must be guaranteed to have been created by a socket on the same context.
Examples
Assigning a socket to a local address
// Assign The in-process name "#1""inproc://#1"0); // Assign The in-process name "My-endpoint" "inproc://my-endpoint" 0);
Connect a socket
// Connect to the in-process name "#1""inproc://#1"0); // Connect to the in-process name "My-endpoint""inproc://my-endpoint" 0);
See Also
Zmq_bind (3) zmq_connect (3) ZMQ_IPC (7) zmq_tcp (7) ZMQ_PGM (7) ZMQ (7)
Authors
THISØMQ manual page was written by Pieter Hintjens <[email protected]>, Martin Sustrik <[email protected]> an D Martin Lucina <[email protected]>.
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
Translation: The Storm
Mail: [Email protected]
Zeromq interface functions: Zmq_inproc–ømq Local in-process (inter-thread) transfer mode