Package io.netty.channel.epoll
Class LinuxSocket
java.lang.Object
io.netty.channel.unix.FileDescriptor
io.netty.channel.unix.Socket
io.netty.channel.epoll.LinuxSocket
A socket which provides access Linux native methods.
-
Field Summary
FieldsFields inherited from class io.netty.channel.unix.Socket
ipv6, UDS_SUN_PATH_SIZE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
bindVSock
(int fd, int cid, int port) void
bindVSock
(VSockAddress address) private static int
connectVSock
(int fd, int cid, int port) boolean
connectVSock
(VSockAddress address) private static InetAddress
deriveInetAddress
(NetworkInterface netInterface, boolean ipv6) (package private) InternetProtocolFamily
family()
private static int
getIntAt
(byte[] array, int startIndex) (package private) InetAddress
private static int
getInterface
(int fd, boolean ipv6) private static int
getIpMulticastLoop
(int fd, boolean ipv6) (package private) NetworkInterface
(package private) PeerCredentials
private static PeerCredentials
getPeerCredentials
(int fd) (package private) int
private static int
getSoBusyPoll
(int fd) (package private) int
private static int
getTcpDeferAccept
(int fd) private static void
getTcpInfo
(int fd, long[] array) (package private) void
getTcpInfo
(EpollTcpInfo info) (package private) int
private static int
getTcpKeepCnt
(int fd) (package private) int
private static int
getTcpKeepIdle
(int fd) (package private) int
private static int
getTcpKeepIntvl
(int fd) (package private) long
private static int
getTcpNotSentLowAt
(int fd) (package private) int
private static int
getTcpUserTimeout
(int fd) (package private) int
private static int
getTimeToLive
(int fd) private static InetAddress
inetAddress
(int value) private static int
interfaceIndex
(InetAddress address) private static int
interfaceIndex
(NetworkInterface networkInterface) (package private) boolean
private static int
isIpFreeBind
(int fd) (package private) boolean
private static int
isIpRecvOrigDestAddr
(int fd) (package private) boolean
private static int
isIpTransparent
(int fd) (package private) boolean
(package private) boolean
private static int
isTcpCork
(int fd) (package private) boolean
private static int
isTcpQuickAck
(int fd) (package private) boolean
isUdpGro()
private static int
isUdpGro
(int fd) private static void
joinGroup
(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex) (package private) void
joinGroup
(InetAddress group, NetworkInterface netInterface, InetAddress source) private static void
joinSsmGroup
(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex, byte[] source) private static void
leaveGroup
(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex) (package private) void
leaveGroup
(InetAddress group, NetworkInterface netInterface, InetAddress source) private static void
leaveSsmGroup
(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex, byte[] source) private static byte[]
localVSockAddress
(int fd) static LinuxSocket
newSocket
(int fd) static LinuxSocket
static LinuxSocket
newSocketDgram
(boolean ipv6) static LinuxSocket
newSocketDgram
(InternetProtocolFamily family) static LinuxSocket
static LinuxSocket
static LinuxSocket
static LinuxSocket
newSocketStream
(boolean ipv6) static LinuxSocket
newSocketStream
(InternetProtocolFamily protocol) static LinuxSocket
(package private) static int
private static int
(package private) int
recvmmsg
(NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) (package private) int
private static byte[]
remoteVSockAddress
(int fd) private static long
sendFile
(int socketFd, DefaultFileRegion src, long baseOffset, long offset, long length) (package private) long
sendFile
(DefaultFileRegion src, long baseOffset, long offset, long length) (package private) int
sendmmsg
(NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) private static void
setInterface
(int fd, boolean ipv6, byte[] interfaceAddress, int scopeId, int networkInterfaceIndex) (package private) void
setInterface
(InetAddress address) (package private) void
setIpFreeBind
(boolean enabled) private static void
setIpFreeBind
(int fd, int freeBind) private static void
setIpMulticastLoop
(int fd, boolean ipv6, int enabled) (package private) void
setIpRecvOrigDestAddr
(boolean enabled) private static void
setIpRecvOrigDestAddr
(int fd, int transparent) (package private) void
setIpTransparent
(boolean enabled) private static void
setIpTransparent
(int fd, int transparent) (package private) void
setLoopbackModeDisabled
(boolean loopbackModeDisabled) (package private) void
setNetworkInterface
(NetworkInterface netInterface) (package private) void
setSoBusyPoll
(int loopMicros) private static void
setSoBusyPoll
(int fd, int loopMicros) (package private) void
setTcpCork
(boolean tcpCork) private static void
setTcpCork
(int fd, int tcpCork) (package private) void
setTcpDeferAccept
(int deferAccept) private static void
setTcpDeferAccept
(int fd, int deferAccept) (package private) void
setTcpFastOpen
(int tcpFastopenBacklog) private static void
setTcpFastOpen
(int fd, int tcpFastopenBacklog) (package private) void
setTcpKeepCnt
(int probes) private static void
setTcpKeepCnt
(int fd, int probes) (package private) void
setTcpKeepIdle
(int seconds) private static void
setTcpKeepIdle
(int fd, int seconds) (package private) void
setTcpKeepIntvl
(int seconds) private static void
setTcpKeepIntvl
(int fd, int seconds) private static void
setTcpMd5Sig
(int fd, boolean ipv6, byte[] address, int scopeId, byte[] key) (package private) void
setTcpMd5Sig
(InetAddress address, byte[] key) private static void
setTcpNotSentLowAt
(int fd, int tcpNotSentLowAt) (package private) void
setTcpNotSentLowAt
(long tcpNotSentLowAt) (package private) void
setTcpQuickAck
(boolean quickAck) private static void
setTcpQuickAck
(int fd, int quickAck) (package private) void
setTcpUserTimeout
(int milliseconds) private static void
setTcpUserTimeout
(int fd, int milliseconds) (package private) void
setTimeToLive
(int ttl) private static void
setTimeToLive
(int fd, int ttl) (package private) void
setUdpGro
(boolean gro) private static void
setUdpGro
(int fd, int gro) Methods inherited from class io.netty.channel.unix.Socket
accept, bind, connect, disconnect, finishConnect, getIntOpt, getRawOpt, getReceiveBufferSize, getSendBufferSize, getSoError, getSoLinger, getTrafficClass, initialize, isBroadcast, isInputShutdown, isIPv6Preferred, isKeepAlive, isOutputShutdown, isReuseAddress, isReusePort, isShutdown, isTcpNoDelay, listen, localAddress, localDomainSocketAddress, newSocketDgram0, newSocketDgram0, newSocketDgram0, newSocketDomain0, newSocketDomainDgram0, newSocketStream0, newSocketStream0, newSocketStream0, recv, recvAddress, recvFd, recvFrom, recvFromAddress, recvFromAddressDomainSocket, recvFromDomainSocket, remoteAddress, remoteDomainSocketAddress, send, sendAddress, sendFd, sendTo, sendTo, sendToAddress, sendToAddress, sendToAddressDomainSocket, sendToAddresses, sendToAddresses, sendToAddressesDomainSocket, sendToDomainSocket, setBroadcast, setIntOpt, setKeepAlive, setRawOpt, setReceiveBufferSize, setReuseAddress, setReusePort, setSendBufferSize, setSoLinger, setTcpNoDelay, setTrafficClass, shouldUseIpv6, shutdown, shutdown, toString, useIpv6
Methods inherited from class io.netty.channel.unix.FileDescriptor
close, equals, from, from, hashCode, intValue, isOpen, markClosed, pipe, read, readAddress, write, writeAddress, writev, writevAddresses
-
Field Details
-
MAX_UINT32_T
private static final long MAX_UINT32_T- See Also:
-
-
Constructor Details
-
LinuxSocket
LinuxSocket(int fd)
-
-
Method Details
-
family
InternetProtocolFamily family() -
sendmmsg
int sendmmsg(NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) throws IOException - Throws:
IOException
-
recvmmsg
int recvmmsg(NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) throws IOException - Throws:
IOException
-
recvmsg
- Throws:
IOException
-
setTimeToLive
- Throws:
IOException
-
setInterface
- Throws:
IOException
-
setNetworkInterface
- Throws:
IOException
-
getInterface
- Throws:
IOException
-
getNetworkInterface
- Throws:
IOException
-
inetAddress
-
joinGroup
void joinGroup(InetAddress group, NetworkInterface netInterface, InetAddress source) throws IOException - Throws:
IOException
-
leaveGroup
void leaveGroup(InetAddress group, NetworkInterface netInterface, InetAddress source) throws IOException - Throws:
IOException
-
interfaceIndex
-
interfaceIndex
- Throws:
IOException
-
setTcpDeferAccept
- Throws:
IOException
-
setTcpQuickAck
- Throws:
IOException
-
setTcpCork
- Throws:
IOException
-
setSoBusyPoll
- Throws:
IOException
-
setTcpNotSentLowAt
- Throws:
IOException
-
setTcpFastOpen
- Throws:
IOException
-
setTcpKeepIdle
- Throws:
IOException
-
setTcpKeepIntvl
- Throws:
IOException
-
setTcpKeepCnt
- Throws:
IOException
-
setTcpUserTimeout
- Throws:
IOException
-
setIpFreeBind
- Throws:
IOException
-
setIpTransparent
- Throws:
IOException
-
setIpRecvOrigDestAddr
- Throws:
IOException
-
getTimeToLive
- Throws:
IOException
-
getTcpInfo
- Throws:
IOException
-
setTcpMd5Sig
- Throws:
IOException
-
isTcpCork
- Throws:
IOException
-
getSoBusyPoll
- Throws:
IOException
-
getTcpDeferAccept
- Throws:
IOException
-
isTcpQuickAck
- Throws:
IOException
-
getTcpNotSentLowAt
- Throws:
IOException
-
getTcpKeepIdle
- Throws:
IOException
-
getTcpKeepIntvl
- Throws:
IOException
-
getTcpKeepCnt
- Throws:
IOException
-
getTcpUserTimeout
- Throws:
IOException
-
isIpFreeBind
- Throws:
IOException
-
isIpTransparent
- Throws:
IOException
-
isIpRecvOrigDestAddr
- Throws:
IOException
-
getPeerCredentials
- Throws:
IOException
-
isLoopbackModeDisabled
- Throws:
IOException
-
setLoopbackModeDisabled
- Throws:
IOException
-
isUdpGro
- Throws:
IOException
-
setUdpGro
- Throws:
IOException
-
sendFile
- Throws:
IOException
-
bindVSock
- Throws:
IOException
-
connectVSock
- Throws:
IOException
-
remoteVSockAddress
-
localVSockAddress
-
getIntAt
private static int getIntAt(byte[] array, int startIndex) -
deriveInetAddress
-
newSocket
-
newVSockStream
-
newVSockStream0
static int newVSockStream0() -
newSocketStream
-
newSocketStream
-
newSocketStream
-
newSocketDgram
-
newSocketDgram
-
newSocketDgram
-
newSocketDomain
-
newSocketDomainDgram
-
newVSockStreamFd
private static int newVSockStreamFd() -
bindVSock
private static int bindVSock(int fd, int cid, int port) -
connectVSock
private static int connectVSock(int fd, int cid, int port) -
remoteVSockAddress
private static byte[] remoteVSockAddress(int fd) -
localVSockAddress
private static byte[] localVSockAddress(int fd) -
joinGroup
private static void joinGroup(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex) throws IOException - Throws:
IOException
-
joinSsmGroup
private static void joinSsmGroup(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex, byte[] source) throws IOException - Throws:
IOException
-
leaveGroup
private static void leaveGroup(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex) throws IOException - Throws:
IOException
-
leaveSsmGroup
private static void leaveSsmGroup(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex, byte[] source) throws IOException - Throws:
IOException
-
sendFile
private static long sendFile(int socketFd, DefaultFileRegion src, long baseOffset, long offset, long length) throws IOException - Throws:
IOException
-
getTcpDeferAccept
- Throws:
IOException
-
isTcpQuickAck
- Throws:
IOException
-
isTcpCork
- Throws:
IOException
-
getSoBusyPoll
- Throws:
IOException
-
getTcpNotSentLowAt
- Throws:
IOException
-
getTcpKeepIdle
- Throws:
IOException
-
getTcpKeepIntvl
- Throws:
IOException
-
getTcpKeepCnt
- Throws:
IOException
-
getTcpUserTimeout
- Throws:
IOException
-
getTimeToLive
- Throws:
IOException
-
isIpFreeBind
- Throws:
IOException
-
isIpTransparent
- Throws:
IOException
-
isIpRecvOrigDestAddr
- Throws:
IOException
-
getTcpInfo
- Throws:
IOException
-
getPeerCredentials
- Throws:
IOException
-
setTcpDeferAccept
- Throws:
IOException
-
setTcpQuickAck
- Throws:
IOException
-
setTcpCork
- Throws:
IOException
-
setSoBusyPoll
- Throws:
IOException
-
setTcpNotSentLowAt
- Throws:
IOException
-
setTcpFastOpen
- Throws:
IOException
-
setTcpKeepIdle
- Throws:
IOException
-
setTcpKeepIntvl
- Throws:
IOException
-
setTcpKeepCnt
- Throws:
IOException
-
setTcpUserTimeout
- Throws:
IOException
-
setIpFreeBind
- Throws:
IOException
-
setIpTransparent
- Throws:
IOException
-
setIpRecvOrigDestAddr
- Throws:
IOException
-
setTcpMd5Sig
private static void setTcpMd5Sig(int fd, boolean ipv6, byte[] address, int scopeId, byte[] key) throws IOException - Throws:
IOException
-
setInterface
private static void setInterface(int fd, boolean ipv6, byte[] interfaceAddress, int scopeId, int networkInterfaceIndex) throws IOException - Throws:
IOException
-
getInterface
private static int getInterface(int fd, boolean ipv6) -
getIpMulticastLoop
- Throws:
IOException
-
setIpMulticastLoop
- Throws:
IOException
-
setTimeToLive
- Throws:
IOException
-
isUdpGro
- Throws:
IOException
-
setUdpGro
- Throws:
IOException
-