summaryrefslogtreecommitdiff
path: root/src/network/core/address.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-08 21:11:16 +0000
committerrubidium <rubidium@openttd.org>2009-04-08 21:11:16 +0000
commit0f0cc67d621fbddae1768013f91b16bd421666c8 (patch)
tree2d7547e196fe17c1ec009aeaf455b0212d5a13d0 /src/network/core/address.h
parente779c56e31010fe2036f049e875d2de58b4fc7d3 (diff)
downloadopenttd-0f0cc67d621fbddae1768013f91b16bd421666c8.tar.xz
(svn r15990) -Codechange: provide a thread safe variant of GetAddressAsString.
Diffstat (limited to 'src/network/core/address.h')
-rw-r--r--src/network/core/address.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/network/core/address.h b/src/network/core/address.h
index a2fac9845..a51339085 100644
--- a/src/network/core/address.h
+++ b/src/network/core/address.h
@@ -122,8 +122,17 @@ public:
/**
* Get the address as a string, e.g. 127.0.0.1:12345.
+ * @param buffer the buffer to write to
+ * @param last the last element in the buffer
+ * @param with_family whether to add the family (e.g. IPvX).
+ */
+ void GetAddressAsString(char *buffer, const char *last, bool with_family = true);
+
+ /**
+ * Get the address as a string, e.g. 127.0.0.1:12345.
* @param with_family whether to add the family (e.g. IPvX).
* @return the address
+ * @note NOT thread safe
*/
const char *GetAddressAsString(bool with_family = true);