|
JS8Call-Improved master
|
Blocking DNS / address lookup utility used by network setup code. More...
#include <QAbstractSocket>#include <QHostAddress>#include <tuple>

Go to the source code of this file.
Functions | |
| std::tuple< QHostAddress, quint16 > | network_server_lookup (QString query, quint16 default_service_port, QHostAddress default_host_address=QHostAddress::LocalHost, QAbstractSocket::NetworkLayerProtocol protocol=QAbstractSocket::AnyIPProtocol) |
| Parse query and perform a blocking lookup for host and port. | |
Blocking DNS / address lookup utility used by network setup code.
The network_server_lookup() function parses a user-style query (which may include an explicit port and/or IPv4/IPv6 address) and returns a tuple of the resolved QHostAddress and the service port to use. If no matching address is found the returned QHostAddress is Null.
| std::tuple< QHostAddress, quint16 > network_server_lookup | ( | QString | query, |
| quint16 | default_service_port, | ||
| QHostAddress | default_host_address, | ||
| QAbstractSocket::NetworkLayerProtocol | required_protocol ) |
Parse query and perform a blocking lookup for host and port.
query supports several shorthand forms:
| query | User-specified host[:port] or special shorthand. |
| default_service_port | Port number used when none is specified. |
| default_host_address | Host address used when query is empty. |
| protocol | Network protocol preference (IPv4/IPv6/Any). |
Parse query and perform a blocking lookup for host and port.
| query | |
| default_service_port | |
| default_host_address | |
| required_protocol |