From d2eb4df8fc61c4c66e29804f334e2d0e935c7ba9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 4 Apr 2019 10:14:38 +0200 Subject: [PATCH] event/{Fully,}BufferedSocket: add more API documentation --- src/event/BufferedSocket.hxx | 5 +++++ src/event/FullyBufferedSocket.hxx | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/event/BufferedSocket.hxx b/src/event/BufferedSocket.hxx index 112ae829e..09bc1a099 100644 --- a/src/event/BufferedSocket.hxx +++ b/src/event/BufferedSocket.hxx @@ -46,6 +46,11 @@ public: using SocketMonitor::Close; private: + /** + * @return the number of bytes read from the socket, 0 if the + * socket isn't ready for reading, -1 on error (the socket has + * been closed and probably destructed) + */ ssize_t DirectRead(void *data, size_t length) noexcept; /** diff --git a/src/event/FullyBufferedSocket.hxx b/src/event/FullyBufferedSocket.hxx index 2351ebf14..8cda1f968 100644 --- a/src/event/FullyBufferedSocket.hxx +++ b/src/event/FullyBufferedSocket.hxx @@ -45,6 +45,11 @@ public: } private: + /** + * @return the number of bytes written to the socket, 0 if the + * socket isn't ready for writing, -1 on error (the socket has + * been closed and probably destructed) + */ ssize_t DirectWrite(const void *data, size_t length) noexcept; protected: