TcpSocketBuilder
class TcpSocketBuilder(selector: SelectorManager, options: SocketOptions) : Configurable<TcpSocketBuilder, SocketOptions>
Content copied to clipboard
TCP socket builder
Constructors
Functions
Link copied to clipboard
fun bind(localAddress: SocketAddress? = null, configure: SocketOptions.AcceptorOptions.() -> Unit = {}): ServerSocket
Content copied to clipboard
Bind server socket to listen to localAddress.
fun bind(hostname: String = "0.0.0.0", port: Int = 0, configure: SocketOptions.AcceptorOptions.() -> Unit = {}): ServerSocket
Content copied to clipboard
Link copied to clipboard
Configure socket options in block function
Link copied to clipboard
suspend fun connect(remoteAddress: SocketAddress, configure: SocketOptions.TCPClientSocketOptions.() -> Unit = {}): Socket
Content copied to clipboard
Connect to remoteAddress.
Properties
Extensions
Link copied to clipboard
suspend fun TcpSocketBuilder.connect(remoteAddress: SocketAddress, configure: SocketOptions.TCPClientSocketOptions.() -> Unit = {}): Socket
Content copied to clipboard