AFSocket#supports(AFSocketCapability).
You can also manually disable a given capability by specifying a System property of the form
org.newsclub.net.unix.library.disable.CAPABILITY_SOMETHING_SOMETHING=true
when invoking the JVM (make sure this property is set before junixsocket is accessed).
A simple way to check which capabilities are supported in an environment is to run the
`junixsocket-selftest` jar.
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| public static final AFSocketCapability | CAPABILITY_ABSTRACT_NAMESPACE
Socket addressing supports the abstract namespace (Linux). |
| public static final AFSocketCapability | CAPABILITY_ANCILLARY_MESSAGES
Socket supports sending and receiving ancillary messages. |
| public static final AFSocketCapability | CAPABILITY_DARWIN
Support for certain Darwin (macOS Kernel)-specific features, such as the AF_SYSTEM domain. |
| public static final AFSocketCapability | CAPABILITY_FD_AS_REDIRECT
A file descriptor can be converted to |
| public static final AFSocketCapability | CAPABILITY_FILE_DESCRIPTORS
Socket supports passing file descriptors via ancillary messages. |
| public static final AFSocketCapability | CAPABILITY_LARGE_PORTS
Support for port numbers larger than 65535 (0xffff). |
| public static final AFSocketCapability | CAPABILITY_NATIVE_SOCKETPAIR
A pair of interconnected sockets can be created natively as AF_UNIX sockets. |
| public static final AFSocketCapability | CAPABILITY_PEER_CREDENTIALS
Socket supports retrieving peer credentials. |
| public static final AFSocketCapability | CAPABILITY_TIPC
Support for AF_TIPC. |
| public static final AFSocketCapability | CAPABILITY_UNIX_DATAGRAMS
Support for AF_UNIX datagrams. |
| public static final AFSocketCapability | CAPABILITY_UNIX_DOMAIN
Support for AF_UNIX. |
| public static final AFSocketCapability | CAPABILITY_UNSAFE
Support for "unsafe" operations. |
| public static final AFSocketCapability | CAPABILITY_VSOCK
Support for AF_VSOCK. |
| public static final AFSocketCapability | CAPABILITY_VSOCK_DGRAM
Support for AF_VSOCK datagrams (not all platforms/kernel versions or configurations support this). |
| public static final AFSocketCapability | CAPABILITY_ZERO_LENGTH_SEND
Support for zero-length send(2). |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | |
| public static AFSocketCapability | |
| public static AFSocketCapability[] |
| bitmask | back to summary |
|---|---|
| private final int bitmask | |
| CAPABILITY_ABSTRACT_NAMESPACE | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_ABSTRACT_NAMESPACE Socket addressing supports the abstract namespace (Linux). | |
| CAPABILITY_ANCILLARY_MESSAGES | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_ANCILLARY_MESSAGES Socket supports sending and receiving ancillary messages. | |
| CAPABILITY_DARWIN | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_DARWIN Support for certain Darwin (macOS Kernel)-specific features, such as the AF_SYSTEM domain. | |
| CAPABILITY_FD_AS_REDIRECT | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_FD_AS_REDIRECT A file descriptor can be converted to | |
| CAPABILITY_FILE_DESCRIPTORS | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_FILE_DESCRIPTORS Socket supports passing file descriptors via ancillary messages. | |
| CAPABILITY_LARGE_PORTS | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_LARGE_PORTS Support for port numbers larger than 65535 (0xffff). Not all systems allow setting port numbers beyond the default TCP range (we use JNI tricks for that). This capability is required for RMI support. | |
| CAPABILITY_NATIVE_SOCKETPAIR | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_NATIVE_SOCKETPAIR A pair of interconnected sockets can be created natively as AF_UNIX sockets.
This currently not possible on Windows, but instead emulated via anonymous AF_INET ports when
you use | |
| CAPABILITY_PEER_CREDENTIALS | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_PEER_CREDENTIALS Socket supports retrieving peer credentials. | |
| CAPABILITY_TIPC | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_TIPC Support for AF_TIPC. Availability of this feature is checked upon launch and therefore loading the "tipc" kernel module at a later point may not be properly reflected. | |
| CAPABILITY_UNIX_DATAGRAMS | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_UNIX_DATAGRAMS Support for AF_UNIX datagrams. | |
| CAPABILITY_UNIX_DOMAIN | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_UNIX_DOMAIN Support for AF_UNIX. Availability of this feature is checked upon launch and therefore, on systems adding support at a later point, may not be properly reflected when checking at a later point. Note While this capability is typically supported on most systems that can actually load a junixsocket JNI library, it is unavailable for older Windows versions (such as 8.1, 10 before AFUNIX.SYS was included, etc.) and on systems where support for UNIX domain sockets is actively disabled. Therefore, it is still recommended to check for this capability. | |
| CAPABILITY_UNSAFE | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_UNSAFE Support for "unsafe" operations. Trading-in safety for speed or simplicity may be justified sometimes.
| |
| CAPABILITY_VSOCK | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_VSOCK Support for AF_VSOCK. Availability of this feature is checked upon launch and therefore enabling vsock at a later point may not be properly reflected.
| |
| CAPABILITY_VSOCK_DGRAM | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_VSOCK_DGRAM Support for AF_VSOCK datagrams (not all platforms/kernel versions or configurations support this). Availability of this feature is checked upon launch and therefore enabling vsock at a later point may not be properly reflected. | |
| CAPABILITY_ZERO_LENGTH_SEND | back to summary |
|---|---|
| public static final AFSocketCapability CAPABILITY_ZERO_LENGTH_SEND Support for zero-length send(2).
This can be used to perform a connection check, but not all operating systems support this or
behave correctly (particularly, IBM AIX, IBM i, and IBM z/OS) at the moment.
If not supported, junixsocket will simply ignore writes of zero-length, and connection checking
with | |
| AFSocketCapability | back to summary |
|---|---|
| private AFSocketCapability(int bit) | |
| getBitmask | back to summary |
|---|---|
| pack-priv int getBitmask() | |
| valueOf | back to summary |
|---|---|
| public static AFSocketCapability valueOf(String name) | |
| values | back to summary |
|---|---|
| public static AFSocketCapability[] values() | |