Skip to content
FutureBlitz

    Install

    Import std.net.tls

    TlsListener

    std.net.tls

    class

    Public Class TlsListener

    Takes TCP connections at an address and accepts each as its TlsServer does, giving them as TlsStreams over TcpStreams. It closes when it goes, or at Close.

    std/net/tls.fb, line 632

    • @PanicsAtCaller Public Static Method Listen(address: SocketAddress, server: TlsServer, backlog: Int = BACKLOG): TlsListener Throws NetError static method #

      Listens at address as server, as TcpListener.Listen does. Panics for a backlog below 1.

    • @PanicsAtCaller Public Static Method Listen(host: String, port: UInt16, server: TlsServer, backlog: Int = BACKLOG): TlsListener Throws NetError static method #

      Listens at host's first address and port as server. Panics for a backlog below 1.

    • Public Property LocalAddress: SocketAddress property #

      Where it listens, the port the OS picked included.

    • Public Method Accept(timeout: Duration? = Null): TlsStream<TcpStream> Throws NetError, TimeoutError method #

      The next connection, once its handshake is done, waiting up to timeout for a TCP connection and its handshake, or as long as they take for a Null one. A client whose handshake fails throws here, as a NetError, or as a TimeoutError when it's too slow for timeout, after which the listener takes the next one.

    • Public Async Method AcceptAsync(timeout: Duration? = Null): TlsStream<TcpStream> Throws NetError, TimeoutError method #

      Accept's Async twin, which waits on the main thread.

    • Public Method Close() method #

      Closes it at once, as a TcpListener closes.

    Report an issue with this page or with FutureBlitz on GitHub.