Skip to main content

bind_loopback

Function bind_loopback 

Source
pub async fn bind_loopback(addr: SocketAddr) -> Result<TcpListener, HttpError>
Expand description

Binds addr after checking that it is a loopback address.

ยงErrors

Returns HttpError::NotLoopback for any other address, or the I/O error from binding.