Package io.netty.channel.epoll
Class Native
java.lang.Object
io.netty.channel.epoll.Native
Native helper methods
Internal usage only!
Static members which call JNI methods must be defined in NativeStaticallyReferencedJniMethods.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final int(package private) static final InetAddress(package private) static final InetAddress(package private) static final booleanstatic final booleanstatic final booleanDeprecated.(package private) static final booleantcp_fastopen client mode enabled state.(package private) static final booleantcp_fastopen server mode enabled state.(package private) static final booleanstatic final Stringprivate static final InternalLoggerprivate static final intstatic final intprivate static final intprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intepollBusyWait(FileDescriptor epollFd, EpollEventArray events) Non-blocking variant ofepollWait(FileDescriptor, EpollEventArray, FileDescriptor, int, int)that will also hint to processor we are in a busy-wait loop.private static intepollBusyWait0(int efd, long address, int len) private static intstatic voidepollCtlAdd(int efd, int fd, int flags) private static intepollCtlAdd0(int efd, int fd, int flags) static voidepollCtlDel(int efd, int fd) private static intepollCtlDel0(int efd, int fd) static voidepollCtlMod(int efd, int fd, int flags) private static intepollCtlMod0(int efd, int fd, int flags) (package private) static intepollReady(long result) (package private) static booleanepollTimerWasUsed(long result) private static intepollWait(int efd, long address, int len, int timeout) (package private) static intepollWait(FileDescriptor epollFd, EpollEventArray events, boolean immediatePoll) (package private) static intepollWait(FileDescriptor epollFd, EpollEventArray events, int timeoutMillis) This uses epoll's own timeout and does not reset/re-arm any timerfdstatic intepollWait(FileDescriptor epollFd, EpollEventArray events, FileDescriptor timerFd, int timeoutSec, int timeoutNs) Deprecated.this method is no longer supported.(package private) static longepollWait(FileDescriptor epollFd, EpollEventArray events, FileDescriptor timerFd, int timeoutSec, int timeoutNs, long millisThreshold) private static longepollWait0(int efd, long address, int len, int timerFd, int timeoutSec, int timeoutNs, long millisThreshold) private static inteventFd()static voideventFdRead(int fd) static voideventFdWrite(int fd, long value) private static booleanprivate static voidstatic FileDescriptorstatic FileDescriptorstatic FileDescriptorstatic int(package private) static intrecvmmsg(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) private static intrecvmmsg0(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) (package private) static intrecvmsg(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket packet) private static intrecvmsg0(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket msg) private static int(package private) static intsendmmsg(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) static intsendmmsg(int fd, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) Deprecated.private static intsendmmsg0(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) static intstatic intsplice(int fd, long offIn, int fdOut, long offOut, long len) private static intsplice0(int fd, long offIn, int fdOut, long offOut, long len) private static inttimerFd()
-
Field Details
-
logger
-
INET6_ANY
-
INET_ANY
-
EPOLLIN
public static final int EPOLLIN -
EPOLLOUT
public static final int EPOLLOUT -
EPOLLRDHUP
public static final int EPOLLRDHUP -
EPOLLET
public static final int EPOLLET -
EPOLLERR
public static final int EPOLLERR -
IS_SUPPORTING_SENDMMSG
public static final boolean IS_SUPPORTING_SENDMMSG -
IS_SUPPORTING_RECVMMSG
static final boolean IS_SUPPORTING_RECVMMSG -
IS_SUPPORTING_UDP_SEGMENT
static final boolean IS_SUPPORTING_UDP_SEGMENT -
TFO_ENABLED_CLIENT_MASK
private static final int TFO_ENABLED_CLIENT_MASK- See Also:
-
TFO_ENABLED_SERVER_MASK
private static final int TFO_ENABLED_SERVER_MASK- See Also:
-
TCP_FASTOPEN_MODE
private static final int TCP_FASTOPEN_MODE -
IS_SUPPORTING_TCP_FASTOPEN_CLIENT
static final boolean IS_SUPPORTING_TCP_FASTOPEN_CLIENTtcp_fastopen client mode enabled state. -
IS_SUPPORTING_TCP_FASTOPEN_SERVER
static final boolean IS_SUPPORTING_TCP_FASTOPEN_SERVERtcp_fastopen server mode enabled state. -
IS_SUPPORTING_TCP_FASTOPEN
Deprecated. -
TCP_MD5SIG_MAXKEYLEN
public static final int TCP_MD5SIG_MAXKEYLEN -
KERNEL_VERSION
-
-
Constructor Details
-
Native
private Native()
-
-
Method Details
-
registerUnix
private static int registerUnix() -
newEventFd
-
newTimerFd
-
isSupportingUdpSegment
private static boolean isSupportingUdpSegment() -
eventFd
private static int eventFd() -
timerFd
private static int timerFd() -
eventFdWrite
public static void eventFdWrite(int fd, long value) -
eventFdRead
public static void eventFdRead(int fd) -
newEpollCreate
-
epollCreate
private static int epollCreate() -
epollWait
@Deprecated public static int epollWait(FileDescriptor epollFd, EpollEventArray events, FileDescriptor timerFd, int timeoutSec, int timeoutNs) throws IOException Deprecated.this method is no longer supported. This functionality is internal to this package.- Throws:
IOException
-
epollWait
static long epollWait(FileDescriptor epollFd, EpollEventArray events, FileDescriptor timerFd, int timeoutSec, int timeoutNs, long millisThreshold) throws IOException - Throws:
IOException
-
epollReady
static int epollReady(long result) -
epollTimerWasUsed
static boolean epollTimerWasUsed(long result) -
epollWait
static int epollWait(FileDescriptor epollFd, EpollEventArray events, boolean immediatePoll) throws IOException - Throws:
IOException
-
epollWait
static int epollWait(FileDescriptor epollFd, EpollEventArray events, int timeoutMillis) throws IOException This uses epoll's own timeout and does not reset/re-arm any timerfd- Throws:
IOException
-
epollBusyWait
Non-blocking variant ofepollWait(FileDescriptor, EpollEventArray, FileDescriptor, int, int)that will also hint to processor we are in a busy-wait loop.- Throws:
IOException
-
epollWait0
private static long epollWait0(int efd, long address, int len, int timerFd, int timeoutSec, int timeoutNs, long millisThreshold) -
epollWait
private static int epollWait(int efd, long address, int len, int timeout) -
epollBusyWait0
private static int epollBusyWait0(int efd, long address, int len) -
epollCtlAdd
- Throws:
IOException
-
epollCtlAdd0
private static int epollCtlAdd0(int efd, int fd, int flags) -
epollCtlMod
- Throws:
IOException
-
epollCtlMod0
private static int epollCtlMod0(int efd, int fd, int flags) -
epollCtlDel
- Throws:
IOException
-
epollCtlDel0
private static int epollCtlDel0(int efd, int fd) -
splice
- Throws:
IOException
-
splice0
private static int splice0(int fd, long offIn, int fdOut, long offOut, long len) -
sendmmsg
@Deprecated public static int sendmmsg(int fd, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) throws IOException Deprecated.- Throws:
IOException
-
sendmmsg
static int sendmmsg(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) throws IOException - Throws:
IOException
-
sendmmsg0
private static int sendmmsg0(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) -
recvmmsg
static int recvmmsg(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) throws IOException - Throws:
IOException
-
recvmmsg0
private static int recvmmsg0(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) -
recvmsg
static int recvmsg(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket packet) throws IOException - Throws:
IOException
-
recvmsg0
private static int recvmsg0(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket msg) -
sizeofEpollEvent
public static int sizeofEpollEvent() -
offsetofEpollData
public static int offsetofEpollData() -
loadNativeLibrary
private static void loadNativeLibrary()
-
Epoll.isTcpFastOpenClientSideAvailable()orEpoll.isTcpFastOpenServerSideAvailable().