Struct gain_listener::Listener[][src]

pub struct Listener {
    pub hostname: String,
    pub port: u16,
    // some fields omitted
}

Connection listener.

Fields

hostname: String

Fully-qualified DNS name of the server.

port: u16

The listening port.

Implementations

impl Listener[src]

pub async fn bind_tls(
    prefix: Option<&str>,
    port: u16,
    buflen: usize
) -> Result<Self, BindError>
[src]

Listen to TLS connections at the specified port. The DNS name can be discovered from the hostname field of the created instance. A custom prefix may be prepended to the name.

If prefix is specified, its length must be between 1 and 31 characters (inclusive), and it must consist of lowercase alphanumeric ASCII characters and dash (-). It must not start or end with dash. It must not start with xn--.

buflen specifies the minimum accept queue length.

pub async fn accept(&mut self) -> Result<Conn, AcceptError>[src]

Accept a client connection.

Auto Trait Implementations

impl !RefUnwindSafe for Listener

impl !Send for Listener

impl !Sync for Listener

impl Unpin for Listener

impl !UnwindSafe for Listener

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.