1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 16:15:08 +00:00

Kernel: Increase the default TCP window size

This increases the default TCP window size to a more reasonable
value of 64k. This allows TCP peers to send us more packets before
waiting for corresponding ACKs.
This commit is contained in:
Gunnar Beutner 2021-05-11 16:18:33 +02:00 committed by Andreas Kling
parent b83a110174
commit c0800ab898

View file

@ -174,7 +174,7 @@ KResult TCPSocket::send_tcp_packet(u16 flags, const UserOrKernelBuffer* payload,
VERIFY(local_port()); VERIFY(local_port());
tcp_packet.set_source_port(local_port()); tcp_packet.set_source_port(local_port());
tcp_packet.set_destination_port(peer_port()); tcp_packet.set_destination_port(peer_port());
tcp_packet.set_window_size(1024); tcp_packet.set_window_size(NumericLimits<u16>::max());
tcp_packet.set_sequence_number(m_sequence_number); tcp_packet.set_sequence_number(m_sequence_number);
tcp_packet.set_data_offset(sizeof(TCPPacket) / sizeof(u32)); tcp_packet.set_data_offset(sizeof(TCPPacket) / sizeof(u32));
tcp_packet.set_flags(flags); tcp_packet.set_flags(flags);