ServerChannel

abstract class ServerChannel extends Closeable

Representation of a bound server

trait Closeable
trait AutoCloseable
class Object
trait Matchable
class Any

Value members

Abstract methods

def socketAddress: InetSocketAddress

The bound socket address for this ServerChannel

The bound socket address for this ServerChannel

Concrete methods

final def addShutdownHook(f: () => Unit)(implicit ec: ExecutionContext): Boolean

Add code to be executed when the ServerChannel is closed

Add code to be executed when the ServerChannel is closed

Value Params
f

hook to execute on shutdown

Returns

true if the hook was successfully registered, false otherwise.

Note

There are no guarantees as to order of shutdown hook execution or that they will be executed sequentially.

final def close(): Unit

Close the ServerChannel and execute any shutdown hooks

Close the ServerChannel and execute any shutdown hooks

Note

this method is idempotent

final def join(): Unit

Wait for this server channel to close, including execution of all successfully registered shutdown hooks.

Wait for this server channel to close, including execution of all successfully registered shutdown hooks.