Struct gain_listener::Listener [−][src]
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]
prefix: Option<&str>,
port: u16,
buflen: usize
) -> Result<Self, BindError>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,