libzmq
src
ws_address.hpp
Go to the documentation of this file.
1
/* SPDX-License-Identifier: MPL-2.0 */
2
3
#ifndef __ZMQ_WS_ADDRESS_HPP_INCLUDED__
4
#define __ZMQ_WS_ADDRESS_HPP_INCLUDED__
5
6
#if !defined ZMQ_HAVE_WINDOWS
7
#include <sys/socket.h>
8
#include <netinet/in.h>
9
#endif
10
11
#include "
ip_resolver.hpp
"
12
13
namespace
zmq
14
{
15
class
ws_address_t
16
{
17
public
:
18
ws_address_t
();
19
ws_address_t
(
const
sockaddr *sa_, socklen_t sa_len_);
20
21
// This function translates textual WS address into an address
22
// structure. If 'local' is true, names are resolved as local interface
23
// names. If it is false, names are resolved as remote hostnames.
24
// If 'ipv6' is true, the name may resolve to IPv6 address.
25
int
resolve
(
const
char
*
name_
,
bool
local_,
bool
ipv6_);
26
27
// The opposite to resolve()
28
int
to_string
(
std::string
&addr_)
const
;
29
30
#if defined ZMQ_HAVE_WINDOWS
31
unsigned
short
family
()
const
;
32
#else
33
sa_family_t
family
()
const
;
34
#endif
35
const
sockaddr *
addr
()
const
;
36
socklen_t
addrlen
()
const
;
37
38
const
char
*
host
()
const
;
39
const
char
*
path
()
const
;
40
41
protected
:
42
ip_addr_t
_address
;
43
44
private
:
45
std::string
_host
;
46
std::string
_path
;
47
};
48
}
49
50
#endif
zmq::ws_address_t::family
sa_family_t family() const
Definition:
ws_address.cpp:135
zmq::ws_address_t::resolve
int resolve(const char *name_, bool local_, bool ipv6_)
Definition:
ws_address.cpp:66
zmq::ws_address_t::_path
std::string _path
Definition:
ws_address.hpp:46
zmq::ws_address_t::path
const char * path() const
Definition:
ws_address.cpp:127
string
GLsizei const GLchar *const * string
Definition:
glcorearb.h:3083
zmq
Definition:
zmq.hpp:229
zmq::ip_addr_t
Definition:
ip_resolver.hpp:16
zmq::ws_address_t::addr
const sockaddr * addr() const
Definition:
ws_address.cpp:112
name_
string name_
Definition:
googletest.cc:182
zmq::ws_address_t::host
const char * host() const
Definition:
ws_address.cpp:122
zmq::ws_address_t
Definition:
ws_address.hpp:15
zmq::ws_address_t::_address
ip_addr_t _address
Definition:
ws_address.hpp:42
zmq::ws_address_t::_host
std::string _host
Definition:
ws_address.hpp:45
zmq::ws_address_t::ws_address_t
ws_address_t()
Definition:
ws_address.cpp:26
zmq::ws_address_t::to_string
int to_string(std::string &addr_) const
Definition:
ws_address.cpp:102
ip_resolver.hpp
zmq::ws_address_t::addrlen
socklen_t addrlen() const
Definition:
ws_address.cpp:117
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:02