pub fn bind(addr: SocketAddr) -> std::io::Result<Self> {
        let std_listener = StdTcpListener::bind(addr)?;
        std_listener.set_nonblocking(true)?;

        Ok(TcpListener::from_std(std_listener)?.into())
    }
Creates an instance by binding (opening) the specified socket address.

Returns a TcpIncoming if the socket address was successfully bound.

# Examples
```no_run
# use tower_service::Service;
# use http::{request::Request, response::Response};
# use tonic::{body::Body, server::NamedService, transport::{Server, server::TcpIncoming}};
# use core::convert::Infallible;
# use std::error::Error;
# fn main() { }  // Cannot have type parameters, hence instead define:
# fn run<S>(some_service: S) -> Result<(), Box<dyn Error + Send + Sync>>
# where
#   S: Service<Request<Body>, Response = Response<Body>, Error = Infallible> + NamedService + Clone + Send + Sync + 'static,
#   S::Future: Send + 'static,
# {
// Find a free port
let mut port = 1322;
let tinc = loop {
let addr = format!("127.0.0.1:{}", port).parse().unwrap();
match TcpIncoming::bind(addr) {
Ok(t) => break t,
Err(_) => port += 1
}
};
Server::builder()
.add_service(some_service)
.serve_with_incoming(tinc);
# Ok(())
# }
tonic/src/transport/server/incoming.rs