[][src]Function yarws::bind

pub async fn bind<'_, L: Into<Option<Logger>>>(
    addr: &'_ str,
    log: L
) -> Result<Server, Error>

Binds tcp listener to the provided addr (typically ip:port).

Errors if binding can't be started. In most cases because port is already used, but other errors could occur also; too many open files, incorrect addr.