summaryrefslogtreecommitdiff
path: root/src/network/core/address.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-06 09:52:52 +0000
committerrubidium <rubidium@openttd.org>2009-05-06 09:52:52 +0000
commit951b9e76153380e97cadab2c6a0ac3454539bb6f (patch)
treef6f2235e26b9e295c7cc5556d39b8d9223f1a40e /src/network/core/address.h
parent29675278c4543f54a3e91227a3bb925c4ec7a595 (diff)
downloadopenttd-951b9e76153380e97cadab2c6a0ac3454539bb6f.tar.xz
(svn r16238) -Change: improve/clarify some network related debug "error" messages by adding more information to them. Also give some clues on how to fix certain issues (like failing advertising).
Diffstat (limited to 'src/network/core/address.h')
-rw-r--r--src/network/core/address.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/network/core/address.h b/src/network/core/address.h
index ecf6efa60..7d8d61ba1 100644
--- a/src/network/core/address.h
+++ b/src/network/core/address.h
@@ -238,6 +238,22 @@ public:
* @param sockets the list of sockets to add the sockets to
*/
void Listen(int socktype, SocketList *sockets);
+
+ /**
+ * Convert the socket type into a string
+ * @param socktype the socket type to convert
+ * @return the string representation
+ * @note only works for SOCK_STREAM and SOCK_DGRAM
+ */
+ static const char *SocketTypeAsString(int socktype);
+
+ /**
+ * Convert the address family into a string
+ * @param family the family to convert
+ * @return the string representation
+ * @note only works for AF_INET, AF_INET6 and AF_UNSPEC
+ */
+ static const char *AddressFamilyAsString(int family);
};
#endif /* ENABLE_NETWORK */