bind

abstract suspend fun bind(local: SocketAddress? = null)

Binds the socket to a local address. If the address is null, then the system will pick up an ephemeral port and a valid local address to bind the socket.

Parameters

local

the SocketAddress to bind to

Throws

if an I/O error occurs