OpenTTD
|
Simpler wrapper struct for NetworkUDPQueryServerThread. More...
Public Member Functions | |
NetworkUDPQueryServerInfo (const NetworkAddress &address, bool manually) | |
Create the structure. More... | |
![]() | |
NetworkAddress (struct sockaddr_storage &address, int address_length) | |
Create a network address based on a resolved IP and port. More... | |
NetworkAddress (sockaddr *address, int address_length) | |
Create a network address based on a resolved IP and port. More... | |
NetworkAddress (const char *hostname="", uint16 port=0, int family=AF_UNSPEC) | |
Create a network address based on a unresolved host and port. More... | |
NetworkAddress (const NetworkAddress &address) | |
Make a clone of another address. More... | |
const char * | GetHostname () |
Get the hostname; in case it wasn't given the IPv4 dotted representation is given. More... | |
void | GetAddressAsString (char *buffer, const char *last, bool with_family=true) |
Get the address as a string, e.g. More... | |
const char * | GetAddressAsString (bool with_family=true) |
Get the address as a string, e.g. More... | |
const sockaddr_storage * | GetAddress () |
Get the address in its internal representation. More... | |
int | GetAddressLength () |
Get the (valid) length of the address. More... | |
uint16 | GetPort () const |
Get the port. More... | |
void | SetPort (uint16 port) |
Set the port. More... | |
bool | IsResolved () const |
Check whether the IP address has been resolved already. More... | |
bool | IsFamily (int family) |
Checks of this address is of the given family. More... | |
bool | IsInNetmask (char *netmask) |
Checks whether this IP address is contained by the given netmask. More... | |
int | CompareTo (NetworkAddress &address) |
Compare the address of this class with the address of another. More... | |
bool | operator== (NetworkAddress &address) |
Compare the address of this class with the address of another. More... | |
bool | operator== (NetworkAddress &address) const |
Compare the address of this class with the address of another. More... | |
bool | operator!= (NetworkAddress address) const |
Compare the address of this class with the address of another. More... | |
bool | operator< (NetworkAddress &address) |
Compare the address of this class with the address of another. More... | |
SOCKET | Connect () |
Connect to the given address. More... | |
void | Listen (int socktype, SocketList *sockets) |
Make the given socket listen. More... | |
Data Fields | |
bool | manually |
Did we connect manually or not? | |
Additional Inherited Members | |
![]() | |
static const char * | SocketTypeAsString (int socktype) |
Convert the socket type into a string. More... | |
static const char * | AddressFamilyAsString (int family) |
Convert the address family into a string. More... | |
Simpler wrapper struct for NetworkUDPQueryServerThread.
Definition at line 54 of file network_udp.cpp.
|
inline |
Create the structure.
address | The address of the server to query. |
manually | Whether the address was entered manually. |
Definition at line 62 of file network_udp.cpp.
Referenced by NetworkUDPQueryServer().