import { Closer , Reader , Writer } from "./deno" ; type Transport = "tcp" ; interface Addr { transport : Transport ; address : string ; } /** A Listener is a generic network listener for stream-oriented protocols. */ export interface Listener extends AsyncIterator < Conn > { /** Waits for and resolves to the next connection to the `Listener`. */ accept ( ) : Promise < Conn > ; /** Close closes the listener. Any pending accept promises will be rejected
     * with errors.
     */ close ( ) : void ; /** Return the address of the `Listener`. */ addr ( ) : Addr ; [ Symbol . asyncIterator ] ( ) : AsyncIterator < Conn > ; } export interface Conn extends Reader , Writer , Closer { /** The local address of the connection. */ localAddr : string ; /** The remote address of the connection. */ remoteAddr : string ; /** The resource ID of the connection. */ rid : number ; /** Shuts down (`shutdown(2)`) the reading side of the TCP connection. Most
     * callers should just use `close()`.
     */ closeRead ( ) : void ; /** Shuts down (`shutdown(2)`) the writing side of the TCP connection. Most
     * callers should just use `close()`.
     */ closeWrite ( ) : void ; } export interface ListenOptions { port : number ; hostname ? : string ; transport ? : Transport ; } param options param options . port param options . hostname param options . transport export function listen ( options ) { throw new Error ( "unsupported" ) ; } export interface ListenTLSOptions { port : number ; hostname ? : string ; transport ? : Transport ; certFile : string ; keyFile : string ; } param options param options . port param options . hostname param options . certFile param options . keyFile export function listenTLS ( options ) { throw new Error ( "unsupported" ) ; } export interface DialOptions { port : number ; hostname ? : string ; transport ? : Transport ; } param options param options . port param options . hostname param options . transport export function dial ( options ) { throw new Error ( "unsupported" ) ; } export interface DialTLSOptions { port : number ; hostname ? : string ; certFile ? : string ; } /**
 * dialTLS establishes a secure connection over TLS (transport layer security).
 */ export function dialTLS ( options ) { throw new Error ( "unsupported" ) ; }