event/FullyBufferedSocket: make WriteFromBuffer() protected
.. and rename it to Flush().
This commit is contained in:
parent
ad27d06979
commit
5b213b0504
@ -54,7 +54,7 @@ FullyBufferedSocket::DirectWrite(const void *data, size_t length)
|
||||
}
|
||||
|
||||
bool
|
||||
FullyBufferedSocket::WriteFromBuffer()
|
||||
FullyBufferedSocket::Flush()
|
||||
{
|
||||
assert(IsDefined());
|
||||
|
||||
@ -128,7 +128,7 @@ FullyBufferedSocket::OnSocketReady(unsigned flags)
|
||||
if (flags & WRITE) {
|
||||
assert(!output.IsEmpty());
|
||||
|
||||
if (!WriteFromBuffer())
|
||||
if (!Flush())
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -44,14 +44,14 @@ public:
|
||||
private:
|
||||
ssize_t DirectWrite(const void *data, size_t length);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Send data from the output buffer to the socket.
|
||||
*
|
||||
* @return false if the socket has been closed
|
||||
*/
|
||||
bool WriteFromBuffer();
|
||||
bool Flush();
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @return false if the socket has been closed
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user