# HG changeset patch # User rubidium # Date 2012-10-28 21:26:57 # Node ID 004c1f10f9daa6126d0b4b71905cb802437c5f28 # Parent bb320d3d4a98983bb6f041fa674837faad40bf18 (svn r24642) -Codechange: add helper function to see if there is anything in the send queue diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -50,6 +50,12 @@ public: bool CanSendReceive(); + /** + * Whether there is something pending in the send queue. + * @return true when someting is pending in the send queue. + */ + bool HasSendQueue() { return this->packet_queue != NULL; } + NetworkTCPSocketHandler(SOCKET s = INVALID_SOCKET); ~NetworkTCPSocketHandler(); };