We are using MQX 4.2.
How do I reduce the RAM usage when a TCP connection is established?
Solved! Go to Solution.
Thank you for the information.
Unfortunately, it will be several weeks before I can get back to this project. I will try your suggestions at that time.
Thank you for the information.
Unfortunately, it will be several weeks before I can get back to this project. I will try your suggestions at that time.
Hi
Usually we can reducing RAM usage at compile time.
You can refer to RTCS user-guider.pdf
chapter 8: Compile time Options.
In what scenario you need to reducing RAM usage when a connection is established?
For UDP , we can change the socket tx/rx buffer size to reduce RAM usage at any time.
For TCP, we can change the socket rx/rx buffer size only before bound.
value = 256; setsockopt(sock, SOL_TCP,OPT_TBSIZE,&value,sizeof(value)); setsockopt(sock, SOL_TCP,OPT_RBSIZE,&value,sizeof(value));
So I would suggest you reduce RAM usage before TCP connection is established.
Regards
Daniel
Regards
Daniel