public abstract <T> NetworkChannel setOption (SocketOption<T> name, T value) throws IOException

Sets the value of a socket option.

<T>     The type of the socket option value
name     The socket option
value     The value of the socket option. A value of null may be a valid value for some socket options.

Returns:  This channel

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

See also: