mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-08 14:56:14 +01:00
Problem: VMCI build broken
Solution: refactor it
This commit is contained in:
21
src/vmci.cpp
21
src/vmci.cpp
@@ -28,7 +28,9 @@
|
||||
*/
|
||||
#include "precompiled.hpp"
|
||||
|
||||
#include "ip.hpp"
|
||||
#include "vmci.hpp"
|
||||
#include "vmci_address.hpp"
|
||||
|
||||
#if defined ZMQ_HAVE_VMCI
|
||||
|
||||
@@ -97,4 +99,23 @@ void zmq::tune_vmci_connect_timeout (ctx_t *context_,
|
||||
#endif
|
||||
}
|
||||
|
||||
zmq::fd_t zmq::vmci_open_socket (const char *address_,
|
||||
const zmq::options_t &options_,
|
||||
zmq::vmci_address_t *out_vmci_addr_)
|
||||
{
|
||||
// Convert the textual address into address structure.
|
||||
int rc = out_vmci_addr_->resolve (address_);
|
||||
if (rc != 0)
|
||||
return retired_fd;
|
||||
|
||||
// Create the socket.
|
||||
fd_t s = open_socket (out_vmci_addr_->family (), SOCK_STREAM, 0);
|
||||
|
||||
if (s == retired_fd) {
|
||||
return retired_fd;
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user