- All Superinterfaces:
AutoCloseable,Closeable,FileDescriptorAccess
- All Known Subinterfaces:
AFSomeSocket,AFSomeSocketChannel
- All Known Implementing Classes:
AFDatagramChannel,AFDatagramSocket,AFServerSocket,AFServerSocketChannel,AFSocket,AFSocketChannel,AFUNIXDatagramChannel,AFUNIXDatagramSocket,AFUNIXServerSocket,AFUNIXServerSocketChannel,AFUNIXSocket,AFUNIXSocketChannel
Marker interface that combines junixsocket-based
SocketChannels, Sockets,
DatagramChannels and DatagramSockets, as well as ServerSockets and
ServerSocketChannels.- Author:
- Christian Kohlschütter
- See Also:
-
Method Summary
Modifier and TypeMethodDescription@Nullable SocketAddressReturns the socket's local socket address, ornullif unavailable or if there was a problem retrieving it.voidsetShutdownOnClose(boolean enabled) Configures whether the socket should be shutdown uponCloseable.close(), which is the default.Methods inherited from interface org.newsclub.net.unix.FileDescriptorAccess
getFileDescriptor
-
Method Details
-
getLocalSocketAddress
@Nullable SocketAddress getLocalSocketAddress()Returns the socket's local socket address, ornullif unavailable or if there was a problem retrieving it.- Returns:
- The local socket address, or
null.
-
setShutdownOnClose
void setShutdownOnClose(boolean enabled) Configures whether the socket should be shutdown uponCloseable.close(), which is the default.- Parameters:
enabled-trueif enabled.
-