zmq_vmci.txt 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. zmq_vmci(7)
  2. ===========
  3. NAME
  4. ----
  5. zmq_vmci - 0MQ transport over virtual machine communicatios interface (VMCI) sockets
  6. SYNOPSIS
  7. --------
  8. The VMCI transport passes messages between VMware virtual machines running on the same host,
  9. between virtual machine and the host and within virtual machines (inter-process transport like ipc).
  10. NOTE: Communication between a virtual machine and the host is not supported on Mac OS X 10.9 and above.
  11. ADDRESSING
  12. ----------
  13. A 0MQ endpoint is a string consisting of a 'transport'`://` followed by an
  14. 'address'. The 'transport' specifies the underlying protocol to use. The
  15. 'address' specifies the transport-specific address to connect to.
  16. For the VMCI transport, the transport is `vmci`, and the meaning of
  17. the 'address' part is defined below.
  18. Binding a socket
  19. ~~~~~~~~~~~~~~~~
  20. When binding a 'socket' to a local address using _zmq_bind()_ with the 'vmci'
  21. transport, the 'endpoint' shall be interpreted as an 'interface' followed by a
  22. colon and the TCP port number to use.
  23. An 'interface' may be specified by either of the following:
  24. * The wild-card `*`, meaning all available interfaces.
  25. * An integer returned by `VMCISock_GetLocalCID` or `@` (ZeroMQ will call VMCISock_GetLocalCID internally).
  26. The port may be specified by:
  27. * A numeric value, usually above 1024 on POSIX systems.
  28. * The wild-card `*`, meaning a system-assigned ephemeral port.
  29. Unbinding wild-card address from a socket
  30. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  31. When wild-card `*` 'endpoint' was used in _zmq_bind()_, the caller should use
  32. real 'endpoint' obtained from the ZMQ_LAST_ENDPOINT socket option to unbind
  33. this 'endpoint' from a socket using _zmq_unbind()_.
  34. Connecting a socket
  35. ~~~~~~~~~~~~~~~~~~~
  36. When connecting a socket to a peer address using _zmq_connect()_ with the 'vmci'
  37. transport, the 'endpoint' shall be interpreted as a 'peer address' followed by
  38. a colon and the port number to use.
  39. A 'peer address' must be a CID of the peer.
  40. EXAMPLES
  41. --------
  42. .Assigning a local address to a socket
  43. ----
  44. // VMCI port 5555 on all available interfaces
  45. rc = zmq_bind(socket, "vmci://*:5555");
  46. assert (rc == 0);
  47. // VMCI port 5555 on the local loop-back interface on all platforms
  48. cid = VMCISock_GetLocalCID();
  49. sprintf(endpoint, "vmci://%d:5555", cid);
  50. rc = zmq_bind(socket, endpoint);
  51. assert (rc == 0);
  52. ----
  53. .Connecting a socket
  54. ----
  55. // Connecting using a CID
  56. sprintf(endpoint, "vmci://%d:5555", cid);
  57. rc = zmq_connect(socket, endpoint);
  58. assert (rc == 0);
  59. ----
  60. SEE ALSO
  61. --------
  62. linkzmq:zmq_bind[3]
  63. linkzmq:zmq_connect[3]
  64. linkzmq:zmq_inproc[7]
  65. linkzmq:zmq_tcp[7]
  66. linkzmq:zmq_pgm[7]
  67. linkzmq:zmq_vmci[7]
  68. linkzmq:zmq_getsockopt[3]
  69. linkzmq:zmq[7]
  70. AUTHORS
  71. -------
  72. This page was written by the 0MQ community. To make a change please
  73. read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.