UDPSocketBuilder

class UDPSocketBuilder : 
    Configurable<UDPSocketBuilder, UDPSocketOptions>

UDP socket builder

Properties

options

var options: UDPSocketOptions

Current socket options

Functions

bind

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

Bind server socket to listen to localAddress

connect

fun connect(
    remoteAddress: SocketAddress,
    localAddress: SocketAddress? = 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: O.() -> Unit): T

Configure socket options in block function