diff options
| author | Christoph Berg <myon@debian.org> | 2025-09-15 23:04:23 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-09-15 23:04:23 +0200 |
| commit | 0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (patch) | |
| tree | d702795f99ac38e0cc17e25f0f7e50fa3e05baf9 /Network/NetworkServerLookup.hpp | |
| parent | 310d05acf2c9233f7e336ae7dd9ffb7b54ca4e62 (diff) | |
New upstream version 3.0.0~rc1+repackupstream/3.0.0_rc1+repack
Diffstat (limited to 'Network/NetworkServerLookup.hpp')
| -rwxr-xr-x | Network/NetworkServerLookup.hpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/Network/NetworkServerLookup.hpp b/Network/NetworkServerLookup.hpp index 7c7c9d11..b3a105d5 100755 --- a/Network/NetworkServerLookup.hpp +++ b/Network/NetworkServerLookup.hpp @@ -1,38 +1,38 @@ -#ifndef NETWORK_SERVER_LOOKUP_HPP__ -#define NETWORK_SERVER_LOOKUP_HPP__ - -#include <tuple> - -#include <QHostAddress> -#include <QAbstractSocket> - -class QString; - -// -// Do a blocking DNS lookup using query as a destination host address -// and port. -// -// query can be one of: -// -// 1) "" (empty string) - use defaults -// 2) ":nnnnn" - override default service port with port nnnnn -// 3) "<valid-host-name>" - override default host address with DNS lookup -// 4) "nnn.nnn.nnn.nnn" - override default host address with the IPv4 address given by nnn.nnn.nnn.nnn -// 5) "[<valid-IPv6-address]" - override default host address with the given IPv6 address -// 6) "<valid-host-name>:nnnnn" - use as per (3) & (2) -// 7) "nnn.nnn.nnn.nnn:nnnnn" - use as per (4) & (2) -// 8) "[<valid-IPv6-address]:nnnnn" - use as per (5) & (2) -// -// The first host address matching the protocol and the service port -// number are returned. -// -// If no suitable host address is found QHostAddress::Null will be -// returned in the first member of the result tuple. -// -std::tuple<QHostAddress, quint16> -network_server_lookup (QString query - , quint16 default_service_port - , QHostAddress default_host_address = QHostAddress::LocalHost - , QAbstractSocket::NetworkLayerProtocol protocol = QAbstractSocket::AnyIPProtocol); - -#endif +#ifndef NETWORK_SERVER_LOOKUP_HPP__
+#define NETWORK_SERVER_LOOKUP_HPP__
+
+#include <tuple>
+
+#include <QHostAddress>
+#include <QAbstractSocket>
+
+class QString;
+
+//
+// Do a blocking DNS lookup using query as a destination host address
+// and port.
+//
+// query can be one of:
+//
+// 1) "" (empty string) - use defaults
+// 2) ":nnnnn" - override default service port with port nnnnn
+// 3) "<valid-host-name>" - override default host address with DNS lookup
+// 4) "nnn.nnn.nnn.nnn" - override default host address with the IPv4 address given by nnn.nnn.nnn.nnn
+// 5) "[<valid-IPv6-address]" - override default host address with the given IPv6 address
+// 6) "<valid-host-name>:nnnnn" - use as per (3) & (2)
+// 7) "nnn.nnn.nnn.nnn:nnnnn" - use as per (4) & (2)
+// 8) "[<valid-IPv6-address]:nnnnn" - use as per (5) & (2)
+//
+// The first host address matching the protocol and the service port
+// number are returned.
+//
+// If no suitable host address is found QHostAddress::Null will be
+// returned in the first member of the result tuple.
+//
+std::tuple<QHostAddress, quint16>
+network_server_lookup (QString query
+ , quint16 default_service_port
+ , QHostAddress default_host_address = QHostAddress::LocalHost
+ , QAbstractSocket::NetworkLayerProtocol protocol = QAbstractSocket::AnyIPProtocol);
+
+#endif
|
