From 2a6e9288fd9e238c2f0b68243fced9e3cf794100 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 7 Apr 2009 20:27:13 +0000 Subject: (svn r15971) -Codechange: make it possible for UDP socket handlers to bind to multiple sockets. --- src/network/core/tcp.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/network/core/tcp.h') 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(); -- cgit v1.2.3-54-g00ecf