Forum Discussion

Volter_phase's avatar
Volter_phase
Copper Contributor
Oct 07, 2024

Changing TCP Receive Window in C#

Hi,
I have an embedded board with limited RAM (25 KB) and have defined two TCP sockets on it.
I can communicate effectively with my Windows application, which I developed in C#.
 
However, I encounter a problem when the Ethernet cable is abruptly disconnected. In this situation, due to the TCP timeout and retry procedure, the embedded board runs out of memory and stops functioning.
 
After consulting with an expert from the company, I learned that this issue is related to the TCP receive window on the PC side (since the receive window on my embedded board is already reduced).
 
They suggested that if I can decrease the TCP receive window for my socket in C#, it may help prevent my board from becoming unresponsive. And they are correct, because when I replaced the PC with another embedded board, this problem did not occur. 
 
I would greatly appreciate any guidance you can provide on how to reduce the TCP receive window just for the connected socket in C# not all adapters window size. Thank you!
No RepliesBe the first to reply