diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-08-08 14:37:22 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-08-08 14:37:22 +0200 |
commit | 6466e3093a4e5e996f2c9f3c4fd9f6eb1ac0e7b9 (patch) | |
tree | 7d871126e909b12675a8335923af3b01e51c1f3a /include | |
parent | d8ac63cd83293ab07659932d5ee6b83d7570bb57 (diff) |
Extract code that reads data into a recvq from StreamSocket::DoRead() into ReadToRecvQ()
Diffstat (limited to 'include')
-rw-r--r-- | include/inspsocket.h | 6 |
1 files changed, 6 insertions, 0 deletions
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: |