diff options
author | rubidium <rubidium@openttd.org> | 2009-04-07 20:27:13 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-04-07 20:27:13 +0000 |
commit | 2a6e9288fd9e238c2f0b68243fced9e3cf794100 (patch) | |
tree | 6cab21c9baf3fb1ca74033e132561b40ed015d91 /src/network/core/tcp.h | |
parent | 6db7f15b3ad8addb7187bec3d309a4e6481ac431 (diff) | |
download | openttd-2a6e9288fd9e238c2f0b68243fced9e3cf794100.tar.xz |
(svn r15971) -Codechange: make it possible for UDP socket handlers to bind to multiple sockets.
Diffstat (limited to 'src/network/core/tcp.h')
-rw-r--r-- | src/network/core/tcp.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h index 90edba014..7e4964813 100644 --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -20,8 +20,15 @@ private: Packet *packet_queue; ///< Packets that are awaiting delivery Packet *packet_recv; ///< Partially received packet public: + SOCKET sock; ///< The socket currently connected to bool writable; ///< Can we write to this socket? + /** + * 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; } + virtual NetworkRecvStatus CloseConnection(); void Send_Packet(Packet *packet); bool Send_Packets(); |