libcppwrap
A collection of C++ wrappers for native APIs
Loading...
Searching...
No Matches
Public Member Functions | List of all members
w::ipv6_address Struct Reference

Wraps struct sockaddr_in6, adding constructors for convenient initialization. More...

#include <sockets.hpp>

Inheritance diagram for w::ipv6_address:
Inheritance graph
[legend]
Collaboration diagram for w::ipv6_address:
Collaboration graph
[legend]

Public Member Functions

 ipv6_address (std::uint16_t port=0)
 Initializes an IPv6 "any" address. More...
 
 ipv6_address (const char *address, std::uint16_t port=0)
 Initializes an IPv6 address. More...
 
 ipv6_address (const char *address, std::uint16_t port, unsigned interface_index)
 Initializes an IPv6 address. More...
 
 ipv6_address (const char *address, std::uint16_t port, const char *interface_name)
 Initializes an IPv6 address. More...
 
 ipv6_address (const in6_addr &address, std::uint16_t port=0)
 Initializes an IPv6 address. More...
 
 ipv6_address (const in6_addr &address, std::uint16_t port, unsigned interface_index)
 Initializes an IPv6 address. More...
 
 ipv6_address (const in6_addr &address, std::uint16_t port, const char *interface_name)
 Initializes an IPv6 address. More...
 

Detailed Description

Wraps struct sockaddr_in6, adding constructors for convenient initialization.

Constructor & Destructor Documentation

◆ ipv6_address() [1/7]

w::ipv6_address::ipv6_address ( std::uint16_t  port = 0)

Initializes an IPv6 "any" address.

Parameters
portThe port number.
Exceptions
std::system_errorAn error occurred parsing address.

◆ ipv6_address() [2/7]

w::ipv6_address::ipv6_address ( const char *  address,
std::uint16_t  port = 0 
)

Initializes an IPv6 address.

Parameters
addressA numeric string representation of the IPv6 address.
portThe port number.
Exceptions
std::system_errorAn error occurred parsing address.

◆ ipv6_address() [3/7]

w::ipv6_address::ipv6_address ( const char *  address,
std::uint16_t  port,
unsigned  interface_index 
)

Initializes an IPv6 address.

Parameters
addressA numeric string representation of the IPv6 address.
portThe port number.
interface_indexThe index of the interface to scope to.
Exceptions
std::system_errorAn error occurred parsing address.

◆ ipv6_address() [4/7]

w::ipv6_address::ipv6_address ( const char *  address,
std::uint16_t  port,
const char *  interface_name 
)

Initializes an IPv6 address.

Parameters
addressA numeric string representation of the IPv6 address.
portThe port number.
interface_nameThe name of the interface to scope to.
Exceptions
std::system_errorAn error occurred parsing address or looking up interface_name.

◆ ipv6_address() [5/7]

w::ipv6_address::ipv6_address ( const in6_addr &  address,
std::uint16_t  port = 0 
)

Initializes an IPv6 address.

Parameters
addressThe IPv6 address.
portThe port number.
Exceptions
std::system_errorAn error occurred parsing address.

◆ ipv6_address() [6/7]

w::ipv6_address::ipv6_address ( const in6_addr &  address,
std::uint16_t  port,
unsigned  interface_index 
)

Initializes an IPv6 address.

Parameters
addressThe IPv6 address.
portThe port number.
interface_indexThe index of the interface to scope to.
Exceptions
std::system_errorAn error occurred parsing address.

◆ ipv6_address() [7/7]

w::ipv6_address::ipv6_address ( const in6_addr &  address,
std::uint16_t  port,
const char *  interface_name 
)

Initializes an IPv6 address.

Parameters
addressThe IPv6 address.
portThe port number.
interface_nameThe name of the interface to scope to.
Exceptions
std::system_errorAn error occurred parsing address or looking up interface_name.

The documentation for this struct was generated from the following files: