A question about building over 80K socket client connection for performance testing

Hi there, I'm building a performance testing tool via Rust TcpStream (and actually I use async-std and it works very well). I have a requirement below:

I need a way to bind the local source IP before making connection to the target TCP server which the concept describes here. For making this happen, could anyone can tell me How I can reach my goal? plz :slight_smile:

After searching in crates.io, I only got one option which is https://crates.io/crates/bind_before_connect, do I have another option? (especially can work with async-std if possible) :slightly_smiling_face:

Sadly no, current std's sockets are focused on very common use cases only.
You'll have to perform bind and connect yourself and convert it to TcpStream

Though I think net2 crate should allow you to configure TcpStream and perform both bind/connect before actually creating TcpStream
There is also more low level socket2 I think

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.