net-coroutines / org.apache.tuweni.net.coroutines / CoroutineNetworkChannel / setOption

setOption

abstract fun <T : Any> setOption(name: SocketOption<T>, value: T?): NetworkChannel (source)

Sets the value of a socket option.

Parameters

name - The socket option.

value - The value of the socket option. A value of null may be a valid value for some socket options.

Exceptions

UnsupportedOperationException - If the socket option is not supported by this channel.

IllegalArgumentException - If the value is not a valid value for this socket option.

ClosedChannelException - If this channel is closed.

IOException - If an I/O error occurs.

Parameters

Return
This channel

See Also

java.net.StandardSocketOptions