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 int
static final int
static final int
static final int
static final int
(package private) static final InetAddress
(package private) static final InetAddress
(package private) static final boolean
static final boolean
static final boolean
Deprecated.(package private) static final boolean
tcp_fastopen client mode enabled state.(package private) static final boolean
tcp_fastopen server mode enabled state.(package private) static final boolean
static final String
private static final InternalLogger
private static final int
static final int
private static final int
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
epollBusyWait
(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 int
epollBusyWait0
(int efd, long address, int len) private static int
static void
epollCtlAdd
(int efd, int fd, int flags) private static int
epollCtlAdd0
(int efd, int fd, int flags) static void
epollCtlDel
(int efd, int fd) private static int
epollCtlDel0
(int efd, int fd) static void
epollCtlMod
(int efd, int fd, int flags) private static int
epollCtlMod0
(int efd, int fd, int flags) (package private) static int
epollReady
(long result) (package private) static boolean
epollTimerWasUsed
(long result) private static int
epollWait
(int efd, long address, int len, int timeout) (package private) static int
epollWait
(FileDescriptor epollFd, EpollEventArray events, boolean immediatePoll) (package private) static int
epollWait
(FileDescriptor epollFd, EpollEventArray events, int timeoutMillis) This uses epoll's own timeout and does not reset/re-arm any timerfdstatic int
epollWait
(FileDescriptor epollFd, EpollEventArray events, FileDescriptor timerFd, int timeoutSec, int timeoutNs) Deprecated.this method is no longer supported.(package private) static long
epollWait
(FileDescriptor epollFd, EpollEventArray events, FileDescriptor timerFd, int timeoutSec, int timeoutNs, long millisThreshold) private static long
epollWait0
(int efd, long address, int len, int timerFd, int timeoutSec, int timeoutNs, long millisThreshold) private static int
eventFd()
static void
eventFdRead
(int fd) static void
eventFdWrite
(int fd, long value) private static boolean
private static void
static FileDescriptor
static FileDescriptor
static FileDescriptor
static int
(package private) static int
recvmmsg
(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) private static int
recvmmsg0
(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) (package private) static int
recvmsg
(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket packet) private static int
recvmsg0
(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket msg) private static int
(package private) static int
sendmmsg
(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) static int
sendmmsg
(int fd, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) Deprecated.private static int
sendmmsg0
(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) static int
static int
splice
(int fd, long offIn, int fdOut, long offOut, long len) private static int
splice0
(int fd, long offIn, int fdOut, long offOut, long len) private static int
timerFd()
-
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()
.