Zeromq interface functions: Zmq_inproc–ømq Local in-process (inter-thread) transfer mode

Source: Internet
Author: User
Tags creative commons attribution

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.