event/FullyBufferedSocket: remove obsolete TODO comment
We have a better solution now.
This commit is contained in:
parent
fd2eafa7c6
commit
5c18e4f114
@ -89,22 +89,6 @@ FullyBufferedSocket::Write(const void *data, size_t length)
|
|||||||
if (length == 0)
|
if (length == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* TODO: disabled because this would add overhead on some callers (the ones that often), but it may be useful */
|
|
||||||
|
|
||||||
if (output.IsEmpty()) {
|
|
||||||
/* try to write it directly first */
|
|
||||||
const auto nbytes = DirectWrite(data, length);
|
|
||||||
if (gcc_likely(nbytes > 0)) {
|
|
||||||
data = (const uint8_t *)data + nbytes;
|
|
||||||
length -= nbytes;
|
|
||||||
if (length == 0)
|
|
||||||
return true;
|
|
||||||
} else if (nbytes < 0)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const bool was_empty = output.IsEmpty();
|
const bool was_empty = output.IsEmpty();
|
||||||
|
|
||||||
if (!output.Append(data, length)) {
|
if (!output.Append(data, length)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user