mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 23:10:32 +00:00
RECEIVE WINDOW is different than RECEIVE BUFFER
The receive buffer is allocated per socket. TCP receive buffer holds TCP data that has not yet been processed (consumed via read/recv system calls) by the application.
This commit is contained in:
parent
1a5368962b
commit
ff978b1ce3
2 changed files with 4 additions and 2 deletions
|
@ -11,6 +11,8 @@
|
|||
U16 RECEIVE_WINDOW; // gets host window size. It is not static.
|
||||
U16 SEND_WINDOW; // gets receive window size from host, then adjust accordingly.
|
||||
|
||||
U32 RECEIVE_BUFFER; // is 32 too much? receive_buffer holds TCP data that has not yet been processed
|
||||
|
||||
#define TCP_MSS 536 // Max Segment Size default
|
||||
|
||||
#define TCP_TIMEOUT 5000
|
||||
|
|
|
@ -647,8 +647,8 @@ CTCPSocket TCPSocket(U16 domain=AF_UNSPEC)
|
|||
QueueInit(accept_queue); // init pending connection queue
|
||||
tcp_socket->accept_queue = accept_queue;
|
||||
|
||||
tcp_socket->receive_buffer_size = RECEIVE_WINDOW;
|
||||
tcp_socket->receive_buffer = CAlloc(RECEIVE_WINDOW);
|
||||
tcp_socket->receive_buffer_size = RECEIVE_BUFFER;
|
||||
tcp_socket->receive_buffer = CAlloc(RECEIVE_BUFFER);
|
||||
|
||||
tcp_socket->max_segment_size = TCP_MSS;
|
||||
|
||||
|
|
Loading…
Reference in a new issue