websockets-rs / rust-websocket

A WebSocket (RFC6455) library written in Rust
http://websockets-rs.github.io/rust-websocket/
MIT License
1.55k stars 223 forks source link

Provide an implementation of local_addr for Async servers #232

Closed thombles closed 5 years ago

thombles commented 5 years ago

When you bind to a dynamically allocated port by specifying 0, it is necessary to query the socket after bind() to see which port was selected by the OS. A local_addr() wrapper is provided for sync. This change adds it for async.