UDPSocketBuilder

class UDPSocketBuilder : 
    Configurable<UDPSocketBuilder, UDPSocketOptions>

UDP socket builder

Constructors

<init>

UDPSocketBuilder(
    selector: SelectorManager,
    options: UDPSocketOptions)

UDP socket builder

Properties

options

var options: UDPSocketOptions

Current socket options

Functions

bind

fun bind(
    localAddress: NetworkAddress? = null,
    configure: UDPSocketOptions.() -> Unit = {}
): BoundDatagramSocket

Bind server socket to listen to localAddress.

connect

fun connect(
    remoteAddress: NetworkAddress,
    localAddress: NetworkAddress? = null,
    configure: UDPSocketOptions.() -> Unit = {}
): ConnectedDatagramSocket

Create a datagram socket to listen datagrams at localAddress and set to remoteAddress.

Inherited Functions

configure

open fun configure(block: Options.() -> Unit): T

Configure socket options in block function