lemunozm / message-io

Fast and easy-to-use event-driven network library.
Apache License 2.0
1.12k stars 75 forks source link

add set_reuse_port to tcp and framed_tcp #176

Open aseuler opened 4 months ago

aseuler commented 4 months ago

please add the config option that we can open the tcp and framed_tcp port reuse feature, thanks.

`rust tcp.rs/ LocalResource::listen_with socket.set_reuse_port(true)?; socket.set_nodelay(true)?;

framed_tcp.rs/ LocalResource::listen_with socket.set_reuse_port(true)?; socket.set_nodelay(true)?; socket.bind(&addr.into())?;

`

BR

lemunozm commented 3 months ago

Hi, I agree that could be a good feature. Could you open a PR with this?