UDPSocketBuilder

UDP socket builder

Constructors

Link copied to clipboard
fun UDPSocketBuilder(selector: SelectorManager, options: SocketOptions.UDPSocketOptions)

Types

Link copied to clipboard
object Companion

Functions

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

Bind server socket to listen to localAddress.

Link copied to clipboard
open fun configure(block: SocketOptions.UDPSocketOptions.() -> Unit): UDPSocketBuilder

Configure socket options in block function

Link copied to clipboard
fun connect(remoteAddress: SocketAddress, localAddress: SocketAddress? = null, configure: SocketOptions.UDPSocketOptions.() -> Unit = {}): ConnectedDatagramSocket

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

Properties

Link copied to clipboard
open override var options: SocketOptions.UDPSocketOptions

Current socket options