Commit 5b213b05 authored by Max Kellermann's avatar Max Kellermann

event/FullyBufferedSocket: make WriteFromBuffer() protected

.. and rename it to Flush().
parent ad27d069
...@@ -54,7 +54,7 @@ FullyBufferedSocket::DirectWrite(const void *data, size_t length) ...@@ -54,7 +54,7 @@ FullyBufferedSocket::DirectWrite(const void *data, size_t length)
} }
bool bool
FullyBufferedSocket::WriteFromBuffer() FullyBufferedSocket::Flush()
{ {
assert(IsDefined()); assert(IsDefined());
...@@ -128,7 +128,7 @@ FullyBufferedSocket::OnSocketReady(unsigned flags) ...@@ -128,7 +128,7 @@ FullyBufferedSocket::OnSocketReady(unsigned flags)
if (flags & WRITE) { if (flags & WRITE) {
assert(!output.IsEmpty()); assert(!output.IsEmpty());
if (!WriteFromBuffer()) if (!Flush())
return false; return false;
} }
......
...@@ -44,14 +44,14 @@ public: ...@@ -44,14 +44,14 @@ public:
private: private:
ssize_t DirectWrite(const void *data, size_t length); ssize_t DirectWrite(const void *data, size_t length);
protected:
/** /**
* Send data from the output buffer to the socket. * Send data from the output buffer to the socket.
* *
* @return false if the socket has been closed * @return false if the socket has been closed
*/ */
bool WriteFromBuffer(); bool Flush();
protected:
/** /**
* @return false if the socket has been closed * @return false if the socket has been closed
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment