summaryrefslogtreecommitdiff
path: root/src/network/core/tcp_content.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-02 18:35:59 +0000
committerrubidium <rubidium@openttd.org>2009-04-02 18:35:59 +0000
commit804370d964486ab0ac51a7402e6b30fced5d31af (patch)
tree4f4462080d78106349d22df1edc1ff6cd3edef1b /src/network/core/tcp_content.h
parentb2e79417833a04bfe5d486e30e5b8fc4a5aec8bb (diff)
downloadopenttd-804370d964486ab0ac51a7402e6b30fced5d31af.tar.xz
(svn r15914) -Codechange: let the content handling make use of NetworkAddress.
Diffstat (limited to 'src/network/core/tcp_content.h')
-rw-r--r--src/network/core/tcp_content.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/network/core/tcp_content.h b/src/network/core/tcp_content.h
index 26f5878ad..8313c733b 100644
--- a/src/network/core/tcp_content.h
+++ b/src/network/core/tcp_content.h
@@ -101,7 +101,7 @@ struct ContentInfo {
/** Base socket handler for all Content TCP sockets */
class NetworkContentSocketHandler : public NetworkTCPSocketHandler {
protected:
- struct sockaddr_in client_addr; ///< The address we're connected to.
+ struct NetworkAddress client_addr; ///< The address we're connected to.
virtual void Close();
/**
@@ -187,12 +187,12 @@ public:
/**
* Create a new cs socket handler for a given cs
* @param s the socket we are connected with
- * @param sin IP etc. of the client
+ * @param address IP etc. of the client
*/
- NetworkContentSocketHandler(SOCKET s, const struct sockaddr_in *sin) :
- NetworkTCPSocketHandler(s)
+ NetworkContentSocketHandler(SOCKET s = INVALID_SOCKET, const NetworkAddress &address = NetworkAddress()) :
+ NetworkTCPSocketHandler(s),
+ client_addr(address)
{
- if (sin != NULL) this->client_addr = *sin;
}
/** On destructing of this class, the socket needs to be closed */