1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:57:45 +00:00

LocalSocket: Bump internal buffer sizes to 16KB.

This gives us some leeway for WindowServer to queue up a bunch of messages
for one of its clients. Longer-term we should improve DoubleBuffer to be
able to grow dynamically in a way that gets billed to some reasonable place.
This commit is contained in:
Andreas Kling 2019-05-20 03:57:25 +02:00
parent dc03b50f41
commit 668bfaa2af

View file

@ -193,9 +193,9 @@ ssize_t LocalSocket::write(FileDescriptor& descriptor, const byte* data, ssize_t
bool LocalSocket::can_write(FileDescriptor& descriptor) const
{
if (descriptor.socket_role() == SocketRole::Accepted)
return !has_attached_peer(descriptor) || m_for_client.bytes_in_write_buffer() < 4096;
return !has_attached_peer(descriptor) || m_for_client.bytes_in_write_buffer() < 16384;
if (descriptor.socket_role() == SocketRole::Connected)
return !has_attached_peer(descriptor) || m_for_server.bytes_in_write_buffer() < 4096;
return !has_attached_peer(descriptor) || m_for_server.bytes_in_write_buffer() < 16384;
ASSERT_NOT_REACHED();
}