From 6466e3093a4e5e996f2c9f3c4fd9f6eb1ac0e7b9 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 8 Aug 2016 14:37:22 +0200 Subject: Extract code that reads data into a recvq from StreamSocket::DoRead() into ReadToRecvQ() --- include/inspsocket.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/inspsocket.h b/include/inspsocket.h index 7b913ec56..0c5f3b3af 100644 --- a/include/inspsocket.h +++ b/include/inspsocket.h @@ -234,6 +234,12 @@ class CoreExport StreamSocket : public EventHandler */ void FlushSendQ(SendQueue& sq); + /** Read incoming data into a receive queue. + * @param rq Receive queue to put incoming data into + * @return < 0 on error or close, 0 if no new data is ready (but the socket is still connected), > 0 if data was read from the socket and put into the recvq + */ + int ReadToRecvQ(std::string& rq); + protected: std::string recvq; public: -- cgit v1.2.3