| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | AFUNIXSocketImpl.
Changes the behavior to be somewhat lenient with respect to the specification. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv final void | |
| pack-priv AFUNIXSocketCredentials | |
| pack-priv final FileDescriptor[] | |
| pack-priv final boolean | |
| pack-priv final void | |
| pack-priv final void |
| AFUNIXSocketImpl | back to summary |
|---|---|
| protected AFUNIXSocketImpl(FileDescriptor fdObj) | |
| clearReceivedFileDescriptors | back to summary |
|---|---|
| pack-priv final void clearReceivedFileDescriptors() | |
| getPeerCredentials | back to summary |
|---|---|
| pack-priv AFUNIXSocketCredentials getPeerCredentials() throws IOException | |
| getReceivedFileDescriptors | back to summary |
|---|---|
| pack-priv final FileDescriptor[] getReceivedFileDescriptors() | |
| hasOutboundFileDescriptors | back to summary |
|---|---|
| pack-priv final boolean hasOutboundFileDescriptors() | |
| receiveFileDescriptors | back to summary |
|---|---|
| pack-priv final void receiveFileDescriptors(int[] fds) throws IOException | |
| setOutboundFileDescriptors | back to summary |
|---|---|
| pack-priv final void setOutboundFileDescriptors(FileDescriptor... fdescs) throws IOException | |
Socket#getTcpNoDelay() and
Socket#setTcpNoDelay(boolean).
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Object | getOption(int
an optID)int identifying the option to fetchOverrides org. Implements java. Fetch the value of an option. |
| public void | setOption(int
identifies the option optID, Object the parameter of the socket option value)Overrides org. Implements java. Enable/disable the option specified by |
| Lenient | back to summary |
|---|---|
| pack-priv Lenient(FileDescriptor fdObj) throws SocketException | |
| getOption | back to summary |
|---|---|
| public Object getOption(int optID) throws SocketException Overrides org. Implements java. Doc from java. Fetch the value of an option. Binary options will return SocketImpl s; ... Boolean noDelay = (Boolean)(s.getOption(TCP_NODELAY)); if (noDelay.booleanValue()) { // true if TCP_NODELAY is enabled... ... }
For options that take a particular type as a parameter, this method will return the
parameter's value, else it will return Object o = s.getOption(SO_LINGER); if (o instanceof Integer) { System.out.print("Linger time is " + ((Integer)o).intValue()); } else { // the true type of o is java.lang.Boolean.FALSE; }
| |
| setOption | back to summary |
|---|---|
| public void setOption(int optID, Object value) throws SocketException Overrides org. Implements java. Doc from java. Enable/disable the option specified by SocketImpl s; ... s.setOption(SO_LINGER, Integer.valueOf(10)); // OK - set SO_LINGER w/ timeout of 10 sec. s.setOption(SO_LINGER, Double.valueOf(10)); // ERROR - expects java.lang.Integer Boolean:
s.setOption(TCP_NODELAY, Boolean.TRUE); // OK - enables TCP_NODELAY, a binary option Boolean#FALSE:
s.setOption(TCP_NODELAY, Boolean.FALSE); // OK - disables TCP_NODELAY s.setOption(SO_LINGER, Boolean.FALSE); // OK - disables SO_LINGER Boolean#FALSE implicitly enables it.
| |