Panda3D
|
A simple place to store and manipulate tcp and port address for communication layer. More...
Public Member Functions | |
__init__ (const SocketAddress inaddr) | |
__init__ (unsigned short int port) | |
Constructor that lets us set a port value. More... | |
clear () | |
Set the internal values to a suitable known value. More... | |
sa_family_t | getFamily () |
Returns AF_INET if this is an IPv4 address, or AF_INET6 if this is an IPv6 address. More... | |
str | getIp () |
Return the IP address portion in dot notation string. More... | |
unsigned long int | GetIPAddressRaw () |
Returns a raw 32-bit unsigned integer representing the IPv4 address. More... | |
str | getIpPort () |
Return the ip address/port in dot notation string. More... | |
unsigned short int | getPort () |
Get the port portion as an integer. More... | |
bool | isAny () |
True if the address is zero. More... | |
bool | isMcastRange () |
True if the address is in the multicast range. More... | |
bool | operator!= (const SocketAddress in) |
bool | operator< (const SocketAddress in) |
bool | operator== (const SocketAddress in) |
bool | setAnyIP (unsigned short int port) |
Set to any address and a specified port. More... | |
bool | setAnyIPv6 (unsigned short int port) |
Set to any IPv6 address and a specified port. More... | |
bool | setBroadcast (unsigned short int port) |
Set to the broadcast address and a specified port. More... | |
bool | setHost (str hostname) |
Initializes the address from a string specifying both the address and port, separated by a colon. More... | |
bool | setHost (str hostname, unsigned short int port) |
This function will take a port and string-based TCP address and initialize the address with this information. More... | |
bool | setHost (uint32_t ip4addr, unsigned short int port) |
bool | setPort (unsigned short int port) |
Set to a specified port. More... | |
A simple place to store and manipulate tcp and port address for communication layer.
__init__ | ( | const SocketAddress | inaddr | ) |
__init__ | ( | unsigned short int | port | ) |
Constructor that lets us set a port value.
clear | ( | ) |
Set the internal values to a suitable known value.
sa_family_t getFamily | ( | ) |
Returns AF_INET if this is an IPv4 address, or AF_INET6 if this is an IPv6 address.
str getIp | ( | ) |
Return the IP address portion in dot notation string.
unsigned long int GetIPAddressRaw | ( | ) |
Returns a raw 32-bit unsigned integer representing the IPv4 address.
str getIpPort | ( | ) |
Return the ip address/port in dot notation string.
If this is an IPv6 address, it will be enclosed in square brackets.
unsigned short int getPort | ( | ) |
Get the port portion as an integer.
bool isAny | ( | ) |
True if the address is zero.
bool isMcastRange | ( | ) |
True if the address is in the multicast range.
bool operator!= | ( | const SocketAddress | in | ) |
bool operator< | ( | const SocketAddress | in | ) |
bool operator== | ( | const SocketAddress | in | ) |
bool setAnyIP | ( | unsigned short int | port | ) |
Set to any address and a specified port.
bool setAnyIPv6 | ( | unsigned short int | port | ) |
Set to any IPv6 address and a specified port.
bool setBroadcast | ( | unsigned short int | port | ) |
Set to the broadcast address and a specified port.
bool setHost | ( | str | hostname | ) |
Initializes the address from a string specifying both the address and port, separated by a colon.
An IPv6 address must be enclosed in brackets.
bool setHost | ( | str | hostname, |
unsigned short int | port | ||
) |
This function will take a port and string-based TCP address and initialize the address with this information.
Returns true on success; on failure, it returns false and the address may be undefined.
bool setHost | ( | uint32_t | ip4addr, |
unsigned short int | port | ||
) |
bool setPort | ( | unsigned short int | port | ) |
Set to a specified port.