mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-14 10:02:04 +01:00

Relicense permission collected from all relevant authors as tallied at: https://github.com/rlenferink/libzmq-relicense/blob/master/checklist.md The relicense grants are collected under RELICENSE/ and will be moved to the above repository in a later commit. Fixes https://github.com/zeromq/libzmq/issues/2376
48 lines
921 B
C++
48 lines
921 B
C++
/* SPDX-License-Identifier: MPL-2.0 */
|
|
|
|
#ifndef __ZMQ_VMCI_ADDRESS_HPP_INCLUDED__
|
|
#define __ZMQ_VMCI_ADDRESS_HPP_INCLUDED__
|
|
|
|
#include <string>
|
|
|
|
#include "platform.hpp"
|
|
#include "ctx.hpp"
|
|
|
|
#if defined(ZMQ_HAVE_VMCI)
|
|
#include <vmci_sockets.h>
|
|
|
|
namespace zmq
|
|
{
|
|
class vmci_address_t
|
|
{
|
|
public:
|
|
vmci_address_t ();
|
|
vmci_address_t (ctx_t *parent_);
|
|
vmci_address_t (const sockaddr *sa, socklen_t sa_len, ctx_t *parent_);
|
|
|
|
// This function sets up the address for VMCI transport.
|
|
int resolve (const char *path_);
|
|
|
|
// The opposite to resolve()
|
|
int to_string (std::string &addr_) const;
|
|
|
|
#if defined ZMQ_HAVE_WINDOWS
|
|
unsigned short family () const;
|
|
#else
|
|
sa_family_t family () const;
|
|
#endif
|
|
const sockaddr *addr () const;
|
|
socklen_t addrlen () const;
|
|
|
|
private:
|
|
struct sockaddr_vm address;
|
|
ctx_t *parent;
|
|
|
|
ZMQ_NON_COPYABLE_NOR_MOVABLE (vmci_address_t)
|
|
};
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|