The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CAddressIPv6 Class Reference
[Addresses]

Inheritance diagram for CAddressIPv6:
Collaboration diagram for CAddressIPv6:

List of all members.


Detailed Description

An IPv6 address.


Public Types

typedef unsigned short Port

Public Member Functions

 CAddressIPv6 ()
 Creates a CAddressIPv6 object that represents the IPv6 wilcard address, i.e. in6addr_any and port 0.
 CAddressIPv6 (const CAddress &address)
 Creates a CAddressIPv6 object which is a copy of the supplied address. Note that the address family for the supplied address must be AF_INET6 or an exception will be thrown. This constructor can be used to convert the correct type of 'generic Winsock Address' back into a full IPv46 address, so, for example, you could take the remote address of a socket connection and initiate a new outgoing connection to it because you have an instance of IFullAddress.
 CAddressIPv6 (const sockaddr_in6 &address)
 Creates a CAddressIPv6 object which is a copy of the supplied address.
 CAddressIPv6 (const JetByteTools::Core::_tstring &hexIPorName, Port port)
 Creates a CAddressIPv6 object from the supplied address in hex ip format "ffff:ffff:ffff:ffff:ffff" and a port.
 CAddressIPv6 (const JetByteTools::Core::_tstring &addressAsString)
 Creates a CAddressIPv6 object from the supplied address in the following string format: "[ffff:ffff:ffff:ffff:ffff]:port".
Port GetPort () const override
 Returns the port.
const IAddressTypeType () const override
 Returns the address type for the address.
IFullAddressClone () const override
 Dynamically allocates a copy of this address. You are responsible for deallocating this copy with delete when you're done with it..
bool IsWildcardAddress () const override
unsigned short Family () const override
 Returns the address family of the address.
const sockaddr & AsSockAddr () const override
 Returns the address as a reference to a sockaddr structure.
int Size () const override
 Returns the size of the sockaddr structure required to store the address.
IAddressRefGetAddressRef () const override
 Returns a reference counted view on this address, be sure to call Release() on the IAdressRef when you're done with it.

Static Public Member Functions

static Port GetPort (const IAddress &address)
static Port GetPort (const sockaddr &address, int addressLength)
static bool TryGetPort (const IAddress &address, Port &port)
static bool TryGetPort (const sockaddr &address, int addressLength, Port &port)
static bool IsValid (const IAddress &address)
static bool IsSameAddress (const IAddress &lhs, const IAddress &rhs)


Member Typedef Documentation

typedef unsigned short Port [inherited]


Constructor & Destructor Documentation

CAddressIPv6 (  ) 

Creates a CAddressIPv6 object that represents the IPv6 wilcard address, i.e. in6addr_any and port 0.

CAddressIPv6 ( const CAddress address  )  [explicit]

Creates a CAddressIPv6 object which is a copy of the supplied address. Note that the address family for the supplied address must be AF_INET6 or an exception will be thrown. This constructor can be used to convert the correct type of 'generic Winsock Address' back into a full IPv46 address, so, for example, you could take the remote address of a socket connection and initiate a new outgoing connection to it because you have an instance of IFullAddress.

CAddressIPv6 ( const sockaddr_in6 &  address  )  [explicit]

Creates a CAddressIPv6 object which is a copy of the supplied address.

CAddressIPv6 ( const JetByteTools::Core::_tstring hexIPorName,
Port  port 
)

Creates a CAddressIPv6 object from the supplied address in hex ip format "ffff:ffff:ffff:ffff:ffff" and a port.

CAddressIPv6 ( const JetByteTools::Core::_tstring addressAsString  )  [explicit]

Creates a CAddressIPv6 object from the supplied address in the following string format: "[ffff:ffff:ffff:ffff:ffff]:port".


Member Function Documentation

IIPAddress::Port GetPort (  )  const [override, virtual]

Returns the port.

Implements IIPAddress.

const IAddressType & Type (  )  const [override, virtual]

Returns the address type for the address.

Implements IFullAddress.

IFullAddress * Clone (  )  const [override, virtual]

Dynamically allocates a copy of this address. You are responsible for deallocating this copy with delete when you're done with it..

Implements IFullAddress.

bool IsWildcardAddress (  )  const [override, virtual]

Implements IFullAddress.

unsigned short Family (  )  const [override, virtual]

Returns the address family of the address.

Implements IAddress.

const sockaddr & AsSockAddr (  )  const [override, virtual]

Returns the address as a reference to a sockaddr structure.

Implements IAddress.

int Size (  )  const [override, virtual]

Returns the size of the sockaddr structure required to store the address.

Implements IAddress.

IAddressRef * GetAddressRef (  )  const [override, virtual]

Returns a reference counted view on this address, be sure to call Release() on the IAdressRef when you're done with it.

Implements IAddress.

IIPAddress::Port GetPort ( const IAddress address  )  [static, inherited]

IIPAddress::Port GetPort ( const sockaddr &  address,
int  addressLength 
) [static, inherited]

bool TryGetPort ( const IAddress address,
IIPAddress::Port port 
) [static, inherited]

bool TryGetPort ( const sockaddr &  address,
int  addressLength,
Port port 
) [static, inherited]

bool IsValid ( const IAddress address  )  [static, inherited]

bool IsSameAddress ( const IAddress lhs,
const IAddress rhs 
) [static, inherited]


Generated on Sun Sep 12 19:10:02 2021 for The Server Framework - v7.4 by doxygen 1.5.3