# SocketOption

public interface **SocketOption** A socket option associated with a socket.

In the `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/package-summary.html` package, the `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/NetworkChannel.html` interface defines the `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/NetworkChannel.html#setOption(java.net.SocketOption<T>,%20T)`
and `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/channels/NetworkChannel.html#getOption(java.net.SocketOption<T>)`
methods to set and query the channel's socket options.

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/java/net/StandardSocketOptions.html`

### Public Method Summary

|---|---|
| abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [name](https://developers.google.com/j2objc/javadoc/jre/reference/java/net/SocketOption.html#name())() Returns the name of the socket option. |
| abstract [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<T\> | [type](https://developers.google.com/j2objc/javadoc/jre/reference/java/net/SocketOption.html#type())() Returns the type of the socket option value. |

## Public Methods

#### public abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**name**
()

Returns the name of the socket option.

##### Returns

- the name of the socket option

#### public abstract [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<T\>
**type**
()

Returns the type of the socket option value.

##### Returns

- the type of the socket option value