Closed Hirrolot closed 5 years ago
I already know that this is because I allocated too small receiving and transmission buffers, but if I allocate larger buffers, the program will just crash because my RAM is not infinite.
That's not what's happening here. smoltcp is not a drop-in replacement for your OS' network stack, and in particular, it will never make any system calls directly. Since you are not polling the smoltcp UdpSocket, the data just sits there doing nothing.
For your use case, it sounds like you just want raw sockets and not a complete network stack.
Thank you
I want to write a program that sends a lot of UDP packets to a specified address. My code now looks like this:
After 208 iterations I received this error:
I already know that this is because I allocated too small receiving and transmission buffers, but if I allocate larger buffers, the program will just crash because my RAM is not infinite.
When I rewrite the code above using the standard
UdpSocket
, everything works fine but not so fast. How to solve this problem, or maybe I should read some articles or docs?