Panda3D
|
A simple place to store and munipulate tcp and port address for communication layer. More...
#include "socket_address.h"
Public Types | |
typedef struct sockaddr_in | AddressType |
Public Member Functions | |
Socket_Address (const AddressType &inaddr) | |
Socket_Address (unsigned short port=0) | |
Constructor that lets us set a port value. More... | |
Socket_Address (const Socket_Address &inaddr) | |
virtual | ~Socket_Address () |
Normal Destructor. More... | |
void | clear () |
Set the internal values to a suitable known value. More... | |
std::string | get_ip () const |
Return the IP address portion in dot notation string. More... | |
std::string | get_ip_port () const |
Return the ip address/port in dot notation string. More... | |
unsigned short | get_port () const |
Get the port portion as an integer. More... | |
AddressType & | GetAddressInfo () |
const AddressType & | GetAddressInfo () const |
unsigned long | GetIPAddressRaw () const |
Return a RAW sockaddr_in. More... | |
bool | is_mcast_range () const |
True if the address is in the multicast range. More... | |
bool | operator!= (const Socket_Address &in) const |
bool | operator< (const Socket_Address &in) const |
bool | operator== (const Socket_Address &in) const |
bool | set_any_IP (int port) |
Set to any address and a specified port. More... | |
bool | set_broadcast (int port) |
Set to the broadcast address and a specified port. More... | |
bool | set_host (const std::string &hostname, int port) |
This function will take a port and string-based TCP address and initialize the address with this information. More... | |
bool | set_host (const std::string &hostname) |
bool | set_host (unsigned int ip4adr, int port) |
bool | set_port (int port) |
Set to a specified port. More... | |
A simple place to store and munipulate tcp and port address for communication layer.
Definition at line 15 of file socket_address.h.
|
inline |
Constructor that lets us set a port value.
Definition at line 32 of file socket_address.I.
References ~Socket_Address().
|
inlinevirtual |
Normal Destructor.
Definition at line 68 of file socket_address.I.
References set_broadcast().
Referenced by Socket_Address().
|
inline |
Set the internal values to a suitable known value.
Definition at line 138 of file socket_address.I.
References get_port().
Referenced by NetAddress::clear(), and set_port().
|
inline |
Return the IP address portion in dot notation string.
Definition at line 160 of file socket_address.I.
References get_ip_port().
Referenced by NetAddress::get_ip_string(), and get_port().
|
inline |
Return the ip address/port in dot notation string.
Definition at line 170 of file socket_address.I.
References get_port(), and set_host().
Referenced by get_ip().
|
inline |
Get the port portion as an integer.
Definition at line 150 of file socket_address.I.
References get_ip().
Referenced by clear(), get_ip_port(), NetAddress::get_port(), and Socket_UDP_Incoming::OpenForInputMCast().
|
inline |
Return a RAW sockaddr_in.
Definition at line 22 of file socket_address.I.
Referenced by NetAddress::get_ip(), and NetAddress::get_ip_component().
|
inline |
True if the address is in the multicast range.
Definition at line 274 of file socket_address.I.
Referenced by set_host().
|
inline |
Set to any address and a specified port.
Definition at line 114 of file socket_address.I.
References set_port().
Referenced by NetAddress::set_any(), and set_broadcast().
|
inline |
Set to the broadcast address and a specified port.
Definition at line 101 of file socket_address.I.
References set_any_IP().
Referenced by NetAddress::set_broadcast(), set_host(), and ~Socket_Address().
|
inline |
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.
Definition at line 185 of file socket_address.I.
References is_mcast_range(), and set_broadcast().
Referenced by get_ip_port(), ConnectionManager::scan_interfaces(), NetAddress::set_host(), NetAddress::set_localhost(), and CConnectionRepository::set_tcp_header_size().
|
inline |
Set to a specified port.
Definition at line 127 of file socket_address.I.
References clear().
Referenced by set_any_IP(), and NetAddress::set_port().