mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-28 19:52:00 +01:00
Add the VMCI transport.
VMCI transport allows fast communication between the Host and a virtual machine, between virtual machines on the same host, and within a virtual machine (like IPC). It requires VMware to be installed on the host and Guest Additions to be installed on a guest.
This commit is contained in:
@@ -79,6 +79,12 @@ zmq::options_t::options_t () :
|
||||
heartbeat_interval (0),
|
||||
heartbeat_timeout (-1)
|
||||
{
|
||||
#if defined ZMQ_HAVE_VMCI
|
||||
vmci_buffer_size = 0;
|
||||
vmci_buffer_min_size = 0;
|
||||
vmci_buffer_max_size = 0;
|
||||
vmci_connect_timeout = -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
int zmq::options_t::setsockopt (int option_, const void *optval_,
|
||||
@@ -585,6 +591,36 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
|
||||
}
|
||||
break;
|
||||
|
||||
# ifdef ZMQ_HAVE_VMCI
|
||||
case ZMQ_VMCI_BUFFER_SIZE:
|
||||
if (optvallen_ == sizeof (uint64_t)) {
|
||||
vmci_buffer_size = *((uint64_t*) optval_);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case ZMQ_VMCI_BUFFER_MIN_SIZE:
|
||||
if (optvallen_ == sizeof (uint64_t)) {
|
||||
vmci_buffer_min_size = *((uint64_t*) optval_);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case ZMQ_VMCI_BUFFER_MAX_SIZE:
|
||||
if (optvallen_ == sizeof (uint64_t)) {
|
||||
vmci_buffer_max_size = *((uint64_t*) optval_);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case ZMQ_VMCI_CONNECT_TIMEOUT:
|
||||
if (optvallen_ == sizeof (int)) {
|
||||
vmci_connect_timeout = *((int*) optval_);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
# endif
|
||||
|
||||
default:
|
||||
#if defined (ZMQ_ACT_MILITANT)
|
||||
// There are valid scenarios for probing with unknown socket option
|
||||
|
||||
Reference in New Issue
Block a user