I’m having issues creating a test program for a small server. I want to create the test program in Rust, and the server itself is written in Rust. I create dozens of connections and send random data to it. The problem is I seem to be creating too many connections, and I run out of random ports.
The connections are closed (they are in a loop and get created and closed in each iteration) but seems that
SO_REUSEADDR is not set up. How can I set it up in the Rust’s