summaryrefslogtreecommitdiff
path: root/src/network/core/core.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-07 20:27:13 +0000
committerrubidium <rubidium@openttd.org>2009-04-07 20:27:13 +0000
commit2a6e9288fd9e238c2f0b68243fced9e3cf794100 (patch)
tree6cab21c9baf3fb1ca74033e132561b40ed015d91 /src/network/core/core.h
parent6db7f15b3ad8addb7187bec3d309a4e6481ac431 (diff)
downloadopenttd-2a6e9288fd9e238c2f0b68243fced9e3cf794100.tar.xz
(svn r15971) -Codechange: make it possible for UDP socket handlers to bind to multiple sockets.
Diffstat (limited to 'src/network/core/core.h')
-rw-r--r--src/network/core/core.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/network/core/core.h b/src/network/core/core.h
index bc348255d..4fca89f54 100644
--- a/src/network/core/core.h
+++ b/src/network/core/core.h
@@ -38,11 +38,8 @@ struct Packet;
class NetworkSocketHandler {
bool has_quit; ///< Whether the current client has quit/send a bad packet
public:
- /* TODO: make socket protected once the TCP stuff is in a real class too */
- SOCKET sock; ///< The socket currently connected to
-public:
/** Create a new unbound socket */
- NetworkSocketHandler(SOCKET s = INVALID_SOCKET) { this->sock = s; this->has_quit = false; }
+ NetworkSocketHandler() { this->has_quit = false; }
/** Close the socket when distructing the socket handler */
virtual ~NetworkSocketHandler() { this->Close(); }
@@ -58,12 +55,6 @@ public:
virtual NetworkRecvStatus CloseConnection() { this->has_quit = true; return NETWORK_RECV_STATUS_OKAY; }
/**
- * Whether this socket is currently bound to a socket.
- * @return true when the socket is bound, false otherwise
- */
- bool IsConnected() const { return this->sock != INVALID_SOCKET; }
-
- /**
* Whether the current client connected to the socket has quit.
* In the case of UDP, for example, once a client quits (send bad
* data), the socket in not closed; only the packet is dropped.