OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields
NetworkUDPQueryServerInfo Struct Reference

Simpler wrapper struct for NetworkUDPQueryServerThread. More...

Inheritance diagram for NetworkUDPQueryServerInfo:

## Public Member Functions
| NetworkUDPQueryServerInfo (const NetworkAddress &address, bool manually)
| Create the structure.
Public Member Functions inherited from NetworkAddress
| NetworkAddress (struct sockaddr_storage &address, int address_length)
| Create a network address based on a resolved IP and port.
| NetworkAddress (sockaddr *address, int address_length)
| Create a network address based on a resolved IP and port.
| NetworkAddress (const char *hostname="", uint16 port=0, int family=AF_UNSPEC)
| Create a network address based on a unresolved host and port.
| NetworkAddress (const NetworkAddress &address)
| Make a clone of another address.
const char * | GetHostname ()
| Get the hostname; in case it wasn't given the IPv4 dotted representation is given.
void | GetAddressAsString (char *buffer, const char *last, bool with_family=true)
| Get the address as a string, e.g.
const char * | GetAddressAsString (bool with_family=true)
| Get the address as a string, e.g.
const sockaddr_storage * | GetAddress ()
| Get the address in its internal representation.
int | GetAddressLength ()
| Get the (valid) length of the address.
uint16 | GetPort () const
| Get the port.
void | SetPort (uint16 port)
| Set the port.
bool | IsResolved () const
| Check whether the IP address has been resolved already.
bool | IsFamily (int family)
| Checks of this address is of the given family.
bool | IsInNetmask (char *netmask)
| Checks whether this IP address is contained by the given netmask.
int | CompareTo (NetworkAddress &address)
| Compare the address of this class with the address of another.
bool | operator== (NetworkAddress &address)
| Compare the address of this class with the address of another.
bool | operator== (NetworkAddress &address) const
| Compare the address of this class with the address of another.
bool | operator!= (NetworkAddress address) const
| Compare the address of this class with the address of another.
bool | operator< (NetworkAddress &address)
| Compare the address of this class with the address of another.
SOCKET | Connect ()
| Connect to the given address.
void | Listen (int socktype, SocketList *sockets)
| Make the given socket listen.

## Data Fields
bool | manually
| Did we connect manually or not?

## Additional Inherited Members
Static Public Member Functions inherited from NetworkAddress
static const char * | SocketTypeAsString (int socktype)
| Convert the socket type into a string.
static const char * | AddressFamilyAsString (int family)
| Convert the address family into a string.

## Detailed Description

Simpler wrapper struct for NetworkUDPQueryServerThread.

Definition at line 54 of file network_udp.cpp.

## Constructor & Destructor Documentation

NetworkUDPQueryServerInfo::NetworkUDPQueryServerInfo | ( | const NetworkAddress & | address,
|  | bool | manually
| ) |  |
| inline

Create the structure.

Parameters

  address | The address of the server to query.
  manually | Whether the address was entered manually.

Definition at line 62 of file network_udp.cpp.

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

- src/network/network_udp.cpp