- All Superinterfaces:
AutoCloseable
,Closeable
,FileDescriptorAccess
- All Known Subinterfaces:
AFSomeSocket
,AFSomeSocketChannel
- All Known Implementing Classes:
AFDatagramChannel
,AFDatagramSocket
,AFServerSocket
,AFServerSocketChannel
,AFSocket
,AFSocketChannel
,AFSYSTEMDatagramChannel
,AFSYSTEMDatagramSocket
,AFSYSTEMServerSocket
,AFSYSTEMServerSocketChannel
,AFSYSTEMSocket
,AFSYSTEMSocketChannel
,AFTIPCDatagramChannel
,AFTIPCDatagramSocket
,AFTIPCServerSocket
,AFTIPCServerSocketChannel
,AFTIPCSocket
,AFTIPCSocketChannel
,AFUNIXDatagramChannel
,AFUNIXDatagramSocket
,AFUNIXServerSocket
,AFUNIXServerSocketChannel
,AFUNIXSocket
,AFUNIXSocketChannel
,AFVSOCKDatagramChannel
,AFVSOCKDatagramSocket
,AFVSOCKServerSocket
,AFVSOCKServerSocketChannel
,AFVSOCKSocket
,AFVSOCKSocketChannel
Marker interface that combines junixsocket-based
SocketChannel
s, Socket
s,
DatagramChannel
s and DatagramSocket
s, as well as ServerSocket
s and
ServerSocketChannel
s.- Author:
- Christian Kohlschütter
- See Also:
-
Method Summary
Modifier and TypeMethodDescription@Nullable SocketAddress
Returns the socket's local socket address, ornull
if unavailable or if there was a problem retrieving it.void
setShutdownOnClose
(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, ornull
if 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
-true
if enabled.
-