SokDoc

sok / Sok.Selector / Selector / register

register

fun register(channel: SelectableChannel, interest: Int, attachment: Any?): SelectionKey (source)

Platform and version requirements: JVM

Register a SelectableChannel the NIO Selector and bind the attachment (SuspentionMap)

Parameters

channel - Channel to register

interest - Initial interest (0)

attachment - SuspentionMap attached to the channel

Return NIO SelectionKey used by the SuspentionMap for registrations