UDPSocketBuilder
class UDPSocketBuilder(selector: SelectorManager, options: SocketOptions.UDPSocketOptions) : Configurable<UDPSocketBuilder, SocketOptions.UDPSocketOptions>
Content copied to clipboard
UDP socket builder
Constructors
Link copied to clipboard
fun UDPSocketBuilder(selector: SelectorManager, options: SocketOptions.UDPSocketOptions)
Content copied to clipboard
Types
Functions
Link copied to clipboard
fun bind(localAddress: NetworkAddress? = null, configure: SocketOptions.UDPSocketOptions.() -> Unit = {}): BoundDatagramSocket
Content copied to clipboard
Bind server socket to listen to localAddress.
Link copied to clipboard
open fun configure(block: SocketOptions.UDPSocketOptions.() -> Unit): UDPSocketBuilder
Content copied to clipboard
Configure socket options in block function
Link copied to clipboard
fun connect(remoteAddress: NetworkAddress, localAddress: NetworkAddress? = null, configure: SocketOptions.UDPSocketOptions.() -> Unit = {}): ConnectedDatagramSocket
Content copied to clipboard
Create a datagram socket to listen datagrams at localAddress and set to remoteAddress.