XPMP2
X-Plane multiplayer library 2 - using instancing
Public Member Functions | Public Attributes | List of all members
XPMP2::SockAddrTy Struct Reference

Helper definition for all these IPv4/6 differences. More...

#include <Network.h>

Public Member Functions

 SockAddrTy ()
 Constructor zeroes out everying. More...
 
 SockAddrTy (const sockaddr *pSa)
 Constructor copies given socket info. More...
 
bool operator< (const SockAddrTy &o) const
 Comparison bases solely on memory compare, order isn't important, just that there is order. More...
 
bool operator== (const SockAddrTy &o) const
 Comparison bases solely on memory compare, order isn't important, just that there is order. More...
 
uint8_t family () const
 return the protocol famaily More...
 
bool isIp4 () const
 is this an IPv4 address? More...
 
bool isIp6 () const
 is this an IPv6 address? More...
 
socklen_t size () const
 < expected structure size as per protocol family More...
 
uint16_t port () const
 Get the port number. More...
 
void setPort (uint16_t port)
 Set the port number. More...
 

Public Attributes

union {
sockaddr sa
 
sockaddr_in sa_in
 
sockaddr_in6 sa_in6
 
}; 
 

Detailed Description

Helper definition for all these IPv4/6 differences.

Constructor & Destructor Documentation

◆ SockAddrTy() [1/2]

XPMP2::SockAddrTy::SockAddrTy ( )
inline

Constructor zeroes out everying.

◆ SockAddrTy() [2/2]

XPMP2::SockAddrTy::SockAddrTy ( const sockaddr *  pSa)

Constructor copies given socket info.

Member Function Documentation

◆ family()

uint8_t XPMP2::SockAddrTy::family ( ) const
inline

return the protocol famaily

◆ isIp4()

bool XPMP2::SockAddrTy::isIp4 ( ) const
inline

is this an IPv4 address?

◆ isIp6()

bool XPMP2::SockAddrTy::isIp6 ( ) const
inline

is this an IPv6 address?

◆ operator<()

bool XPMP2::SockAddrTy::operator< ( const SockAddrTy o) const
inline

Comparison bases solely on memory compare, order isn't important, just that there is order.

◆ operator==()

bool XPMP2::SockAddrTy::operator== ( const SockAddrTy o) const
inline

Comparison bases solely on memory compare, order isn't important, just that there is order.

◆ port()

uint16_t XPMP2::SockAddrTy::port ( ) const
inline

Get the port number.

◆ setPort()

void XPMP2::SockAddrTy::setPort ( uint16_t  port)
inline

Set the port number.

◆ size()

socklen_t XPMP2::SockAddrTy::size ( ) const
inline

< expected structure size as per protocol family

Member Data Documentation

◆ 

union { ... }

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