class TcpListener
source · line 166public
public class TcpListener private constructor(private val owner: SocketOwner) : Closeable
- Supertype
Closeable - Inherited
fun dispose(): Unit· Closeable
An owned blocking TCP listener; accepted streams have independent ownership.
function localAddress
source · line 170public
public fun localAddress(): SocketAddress
Queries the actual bound address, including any ephemeral port.
function close
source · line 220public
public override fun close(): Unit
- Overrides
close
Closes the owned native descriptor; subsequent I/O through this owner is invalid.
function accept
source · line 206public
public fun accept(): TcpStream
Blocks until a connection is accepted, returning an owned stream.
property isClosed
source · line 174public
public val isClosed: Boolean
get: public read-only
Whether this owned resource has been closed.
getter get
source · line 174public
get(): Boolean