'\" t .\" Title: zmq_vmci .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 10/23/2023 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.3.5 .\" Language: English .\" .TH "ZMQ_VMCI" "7" "10/23/2023" "0MQ 4\&.3\&.5" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_vmci \- 0MQ transport over virtual machine communicatios interface (VMCI) sockets .SH "SYNOPSIS" .sp The VMCI transport passes messages between VMware virtual machines running on the same host, between virtual machine and the host and within virtual machines (inter\-process transport like ipc)\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp Communication between a virtual machine and the host is not supported on Mac OS X 10\&.9 and above\&. .sp .5v .RE .SH "ADDRESSING" .sp A 0MQ endpoint is a string consisting of a \fItransport\fR:// followed by an \fIaddress\fR\&. The \fItransport\fR specifies the underlying protocol to use\&. The \fIaddress\fR specifies the transport\-specific address to connect to\&. .sp For the VMCI transport, the transport is vmci, and the meaning of the \fIaddress\fR part is defined below\&. .SS "Binding a socket" .sp When binding a \fIsocket\fR to a local address using \fIzmq_bind()\fR with the \fIvmci\fR transport, the \fIendpoint\fR shall be interpreted as an \fIinterface\fR followed by a colon and the TCP port number to use\&. .sp An \fIinterface\fR may be specified by either of the following: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The wild\-card *, meaning all available interfaces\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} An integer returned by VMCISock_GetLocalCID or @ (ZeroMQ will call VMCISock_GetLocalCID internally)\&. .RE .sp The port may be specified by: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} A numeric value, usually above 1024 on POSIX systems\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The wild\-card *, meaning a system\-assigned ephemeral port\&. .RE .SS "Unbinding wild\-card address from a socket" .sp When wild\-card * \fIendpoint\fR was used in \fIzmq_bind()\fR, the caller should use real \fIendpoint\fR obtained from the ZMQ_LAST_ENDPOINT socket option to unbind this \fIendpoint\fR from a socket using \fIzmq_unbind()\fR\&. .SS "Connecting a socket" .sp When connecting a socket to a peer address using \fIzmq_connect()\fR with the \fIvmci\fR transport, the \fIendpoint\fR shall be interpreted as a \fIpeer address\fR followed by a colon and the port number to use\&. .sp A \fIpeer address\fR must be a CID of the peer\&. .SH "EXAMPLES" .PP \fBAssigning a local address to a socket\fR. .sp .if n \{\ .RS 4 .\} .nf // VMCI port 5555 on all available interfaces rc = zmq_bind(socket, "vmci://*:5555"); assert (rc == 0); // VMCI port 5555 on the local loop\-back interface on all platforms cid = VMCISock_GetLocalCID(); sprintf(endpoint, "vmci://%d:5555", cid); rc = zmq_bind(socket, endpoint); assert (rc == 0); .fi .if n \{\ .RE .\} .PP \fBConnecting a socket\fR. .sp .if n \{\ .RS 4 .\} .nf // Connecting using a CID sprintf(endpoint, "vmci://%d:5555", cid); rc = zmq_connect(socket, endpoint); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_inproc\fR(7) \fBzmq_tcp\fR(7) \fBzmq_pgm\fR(7) \fBzmq_vmci\fR(7) \fBzmq_getsockopt\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&.