Top Description Fields Constructors Methods
io.netty.channel.epoll

public final Class LinuxSocket

extends Socket
Class Inheritance
Annotations
@UnstableApi
Imports
io.netty.channel.ChannelException, .DefaultFileRegion, io.netty.channel.unix.Errors, .NativeInetAddress, .PeerCredentials, .Socket, io.netty.channel.socket.InternetProtocolFamily, io.netty.util.internal.PlatformDependent, .SocketUtils, .UnstableApi, java.io.IOException, java.net.InetAddress, .Inet6Address, .NetworkInterface, .UnknownHostException, java.util.Enumeration

A socket which provides access Linux native methods.

Field Summary

Modifier and TypeField and Description
pack-priv static final InetAddress
private static final InetAddress
private static final long
Inherited from io.netty.channel.unix.Socket:
ipv6UDS_SUN_PATH_SIZE

Constructor Summary

AccessConstructor and Description
pack-priv
LinuxSocket(int fd)

Method Summary

Modifier and TypeMethod and Description
public void
private static native int
bindVSock(int fd, int cid, int port)

public boolean
private static native int
connectVSock(int fd, int cid, int port)

private static InetAddress
deriveInetAddress(NetworkInterface netInterface, boolean ipv6)

pack-priv InternetProtocolFamily
private static int
getIntAt(byte[] array, int startIndex)

pack-priv InetAddress
private static native int
getInterface(int fd, boolean ipv6)

private static native int
getIpMulticastLoop(int fd, boolean ipv6)

pack-priv NetworkInterface
pack-priv PeerCredentials
private static native PeerCredentials
pack-priv int
private static native int
getSoBusyPoll(int fd)

pack-priv int
private static native int
pack-priv void
private static native void
getTcpInfo(int fd, long[] array)

pack-priv int
private static native int
getTcpKeepCnt(int fd)

pack-priv int
private static native int
pack-priv int
private static native int
pack-priv long
private static native int
pack-priv int
private static native int
pack-priv int
private static native int
getTimeToLive(int fd)

private static InetAddress
inetAddress(int value)

private static int
interfaceIndex(NetworkInterface networkInterface)

private static int
pack-priv boolean
private static native int
isIpFreeBind(int fd)

pack-priv boolean
private static native int
pack-priv boolean
private static native int
pack-priv boolean
pack-priv boolean
private static native int
isTcpCork(int fd)

pack-priv boolean
private static native int
isTcpQuickAck(int fd)

pack-priv boolean
private static native int
isUdpGro(int fd)

pack-priv void
joinGroup(InetAddress group, NetworkInterface netInterface, InetAddress source)

private static native void
joinGroup(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex)

private static native void
joinSsmGroup(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex, byte[] source)

pack-priv void
leaveGroup(InetAddress group, NetworkInterface netInterface, InetAddress source)

private static native void
leaveGroup(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex)

private static native void
leaveSsmGroup(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex, byte[] source)

public VSockAddress
private static native byte[]
public static LinuxSocket
newSocket(int fd)

public static LinuxSocket
newSocketDgram(boolean ipv6)

public static LinuxSocket
public static LinuxSocket
public static LinuxSocket
public static LinuxSocket
public static LinuxSocket
newSocketStream(boolean ipv6)

public static LinuxSocket
public static LinuxSocket
public static LinuxSocket
pack-priv static int
private static native int
pack-priv int
pack-priv int
public VSockAddress
private static native byte[]
pack-priv long
sendFile(DefaultFileRegion src, long baseOffset, long offset, long length)

private static native long
sendFile(int socketFd, DefaultFileRegion src, long baseOffset, long offset, long length)

pack-priv int
pack-priv void
private static native void
setInterface(int fd, boolean ipv6, byte[] interfaceAddress, int scopeId, int networkInterfaceIndex)

pack-priv void
setIpFreeBind(boolean enabled)

private static native void
setIpFreeBind(int fd, int freeBind)

private static native void
setIpMulticastLoop(int fd, boolean ipv6, int enabled)

pack-priv void
setIpRecvOrigDestAddr(boolean enabled)

private static native void
setIpRecvOrigDestAddr(int fd, int transparent)

pack-priv void
setIpTransparent(boolean enabled)

private static native void
setIpTransparent(int fd, int transparent)

pack-priv void
setLoopbackModeDisabled(boolean loopbackModeDisabled)

pack-priv void
pack-priv void
setSoBusyPoll(int loopMicros)

private static native void
setSoBusyPoll(int fd, int loopMicros)

pack-priv void
setTcpCork(boolean tcpCork)

private static native void
setTcpCork(int fd, int tcpCork)

pack-priv void
setTcpDeferAccept(int deferAccept)

private static native void
setTcpDeferAccept(int fd, int deferAccept)

pack-priv void
setTcpFastOpen(int tcpFastopenBacklog)

private static native void
setTcpFastOpen(int fd, int tcpFastopenBacklog)

pack-priv void
setTcpKeepCnt(int probes)

private static native void
setTcpKeepCnt(int fd, int probes)

pack-priv void
setTcpKeepIdle(int seconds)

private static native void
setTcpKeepIdle(int fd, int seconds)

pack-priv void
setTcpKeepIntvl(int seconds)

private static native void
setTcpKeepIntvl(int fd, int seconds)

pack-priv void
setTcpMd5Sig(InetAddress address, byte[] key)

private static native void
setTcpMd5Sig(int fd, boolean ipv6, byte[] address, int scopeId, byte[] key)

pack-priv void
setTcpNotSentLowAt(long tcpNotSentLowAt)

private static native void
setTcpNotSentLowAt(int fd, int tcpNotSentLowAt)

pack-priv void
setTcpQuickAck(boolean quickAck)

private static native void
setTcpQuickAck(int fd, int quickAck)

pack-priv void
setTcpUserTimeout(int milliseconds)

private static native void
setTcpUserTimeout(int fd, int milliseconds)

pack-priv void
setTimeToLive(int ttl)

private static native void
setTimeToLive(int fd, int ttl)

pack-priv void
setUdpGro(boolean gro)

private static native void
setUdpGro(int fd, int gro)

private static InetAddress
Inherited from io.netty.channel.unix.Socket:
acceptbindconnectdisconnectfinishConnectgetIntOptgetRawOptgetReceiveBufferSizegetSendBufferSizegetSoErrorgetSoLingergetTrafficClassinitializeisBroadcastisInputShutdownisIPv6PreferredisKeepAliveisOutputShutdownisReuseAddressisReusePortisShutdownisTcpNoDelaylistenlocalAddresslocalDomainSocketAddressnewSocketDgram0newSocketDgram0newSocketDgram0newSocketDomain0newSocketDomainDgram0newSocketStream0newSocketStream0newSocketStream0recvrecvAddressrecvFdrecvFromrecvFromAddressrecvFromAddressDomainSocketrecvFromDomainSocketremoteAddressremoteDomainSocketAddresssendsendAddresssendFdsendTosendTosendToAddresssendToAddresssendToAddressDomainSocketsendToAddressessendToAddressessendToAddressesDomainSocketsendToDomainSocketsetBroadcastsetIntOptsetKeepAlivesetRawOptsetReceiveBufferSizesetReuseAddresssetReusePortsetSendBufferSizesetSoLingersetTcpNoDelaysetTrafficClassshouldUseIpv6shutdownshutdowntoStringuseIpv6

Field Detail

INET6_ANYback to summary
pack-priv static final InetAddress INET6_ANY
INET_ANYback to summary
private static final InetAddress INET_ANY
MAX_UINT32_Tback to summary
private static final long MAX_UINT32_T

Constructor Detail

LinuxSocketback to summary
pack-priv LinuxSocket(int fd)

Method Detail

bindVSockback to summary
public void bindVSock(VSockAddress address) throws IOException
bindVSockback to summary
private static native int bindVSock(int fd, int cid, int port)
connectVSockback to summary
public boolean connectVSock(VSockAddress address) throws IOException
connectVSockback to summary
private static native int connectVSock(int fd, int cid, int port)
deriveInetAddressback to summary
private static InetAddress deriveInetAddress(NetworkInterface netInterface, boolean ipv6)
familyback to summary
pack-priv InternetProtocolFamily family()
getIntAtback to summary
private static int getIntAt(byte[] array, int startIndex)
getInterfaceback to summary
pack-priv InetAddress getInterface() throws IOException
getInterfaceback to summary
private static native int getInterface(int fd, boolean ipv6)
getIpMulticastLoopback to summary
private static native int getIpMulticastLoop(int fd, boolean ipv6) throws IOException
getNetworkInterfaceback to summary
pack-priv NetworkInterface getNetworkInterface() throws IOException
getPeerCredentialsback to summary
pack-priv PeerCredentials getPeerCredentials() throws IOException
getPeerCredentialsback to summary
private static native PeerCredentials getPeerCredentials(int fd) throws IOException
getSoBusyPollback to summary
pack-priv int getSoBusyPoll() throws IOException
getSoBusyPollback to summary
private static native int getSoBusyPoll(int fd) throws IOException
getTcpDeferAcceptback to summary
pack-priv int getTcpDeferAccept() throws IOException
getTcpDeferAcceptback to summary
private static native int getTcpDeferAccept(int fd) throws IOException
getTcpInfoback to summary
pack-priv void getTcpInfo(EpollTcpInfo info) throws IOException
getTcpInfoback to summary
private static native void getTcpInfo(int fd, long[] array) throws IOException
getTcpKeepCntback to summary
pack-priv int getTcpKeepCnt() throws IOException
getTcpKeepCntback to summary
private static native int getTcpKeepCnt(int fd) throws IOException
getTcpKeepIdleback to summary
pack-priv int getTcpKeepIdle() throws IOException
getTcpKeepIdleback to summary
private static native int getTcpKeepIdle(int fd) throws IOException
getTcpKeepIntvlback to summary
pack-priv int getTcpKeepIntvl() throws IOException
getTcpKeepIntvlback to summary
private static native int getTcpKeepIntvl(int fd) throws IOException
getTcpNotSentLowAtback to summary
pack-priv long getTcpNotSentLowAt() throws IOException
getTcpNotSentLowAtback to summary
private static native int getTcpNotSentLowAt(int fd) throws IOException
getTcpUserTimeoutback to summary
pack-priv int getTcpUserTimeout() throws IOException
getTcpUserTimeoutback to summary
private static native int getTcpUserTimeout(int fd) throws IOException
getTimeToLiveback to summary
pack-priv int getTimeToLive() throws IOException
getTimeToLiveback to summary
private static native int getTimeToLive(int fd) throws IOException
inetAddressback to summary
private static InetAddress inetAddress(int value)
interfaceIndexback to summary
private static int interfaceIndex(NetworkInterface networkInterface)
interfaceIndexback to summary
private static int interfaceIndex(InetAddress address) throws IOException
isIpFreeBindback to summary
pack-priv boolean isIpFreeBind() throws IOException
isIpFreeBindback to summary
private static native int isIpFreeBind(int fd) throws IOException
isIpRecvOrigDestAddrback to summary
pack-priv boolean isIpRecvOrigDestAddr() throws IOException
isIpRecvOrigDestAddrback to summary
private static native int isIpRecvOrigDestAddr(int fd) throws IOException
isIpTransparentback to summary
pack-priv boolean isIpTransparent() throws IOException
isIpTransparentback to summary
private static native int isIpTransparent(int fd) throws IOException
isLoopbackModeDisabledback to summary
pack-priv boolean isLoopbackModeDisabled() throws IOException
isTcpCorkback to summary
pack-priv boolean isTcpCork() throws IOException
isTcpCorkback to summary
private static native int isTcpCork(int fd) throws IOException
isTcpQuickAckback to summary
pack-priv boolean isTcpQuickAck() throws IOException
isTcpQuickAckback to summary
private static native int isTcpQuickAck(int fd) throws IOException
isUdpGroback to summary
pack-priv boolean isUdpGro() throws IOException
isUdpGroback to summary
private static native int isUdpGro(int fd) throws IOException
joinGroupback to summary
pack-priv void joinGroup(InetAddress group, NetworkInterface netInterface, InetAddress source) throws IOException
joinGroupback to summary
private static native void joinGroup(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex) throws IOException
joinSsmGroupback to summary
private static native void joinSsmGroup(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex, byte[] source) throws IOException
leaveGroupback to summary
pack-priv void leaveGroup(InetAddress group, NetworkInterface netInterface, InetAddress source) throws IOException
leaveGroupback to summary
private static native void leaveGroup(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex) throws IOException
leaveSsmGroupback to summary
private static native void leaveSsmGroup(int fd, boolean ipv6, byte[] group, byte[] interfaceAddress, int scopeId, int interfaceIndex, byte[] source) throws IOException
localVSockAddressback to summary
public VSockAddress localVSockAddress()
localVSockAddressback to summary
private static native byte[] localVSockAddress(int fd)
newSocketback to summary
public static LinuxSocket newSocket(int fd)
newSocketDgramback to summary
public static LinuxSocket newSocketDgram(boolean ipv6)
newSocketDgramback to summary
public static LinuxSocket newSocketDgram(InternetProtocolFamily family)
newSocketDgramback to summary
public static LinuxSocket newSocketDgram()

Hides io.netty.channel.unix.Socket.newSocketDgram.

newSocketDomainback to summary
public static LinuxSocket newSocketDomain()

Hides io.netty.channel.unix.Socket.newSocketDomain.

newSocketDomainDgramback to summary
public static LinuxSocket newSocketDomainDgram()

Hides io.netty.channel.unix.Socket.newSocketDomainDgram.

newSocketStreamback to summary
public static LinuxSocket newSocketStream(boolean ipv6)
newSocketStreamback to summary
public static LinuxSocket newSocketStream(InternetProtocolFamily protocol)
newSocketStreamback to summary
public static LinuxSocket newSocketStream()

Hides io.netty.channel.unix.Socket.newSocketStream.

newVSockStreamback to summary
public static LinuxSocket newVSockStream()
newVSockStream0back to summary
pack-priv static int newVSockStream0()
newVSockStreamFdback to summary
private static native int newVSockStreamFd()
recvmmsgback to summary
pack-priv int recvmmsg(NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) throws IOException
recvmsgback to summary
pack-priv int recvmsg(NativeDatagramPacketArray.NativeDatagramPacket msg) throws IOException
remoteVSockAddressback to summary
public VSockAddress remoteVSockAddress()
remoteVSockAddressback to summary
private static native byte[] remoteVSockAddress(int fd)
sendFileback to summary
pack-priv long sendFile(DefaultFileRegion src, long baseOffset, long offset, long length) throws IOException
sendFileback to summary
private static native long sendFile(int socketFd, DefaultFileRegion src, long baseOffset, long offset, long length) throws IOException
sendmmsgback to summary
pack-priv int sendmmsg(NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) throws IOException
setInterfaceback to summary
pack-priv void setInterface(InetAddress address) throws IOException
setInterfaceback to summary
private static native void setInterface(int fd, boolean ipv6, byte[] interfaceAddress, int scopeId, int networkInterfaceIndex) throws IOException
setIpFreeBindback to summary
pack-priv void setIpFreeBind(boolean enabled) throws IOException
setIpFreeBindback to summary
private static native void setIpFreeBind(int fd, int freeBind) throws IOException
setIpMulticastLoopback to summary
private static native void setIpMulticastLoop(int fd, boolean ipv6, int enabled) throws IOException
setIpRecvOrigDestAddrback to summary
pack-priv void setIpRecvOrigDestAddr(boolean enabled) throws IOException
setIpRecvOrigDestAddrback to summary
private static native void setIpRecvOrigDestAddr(int fd, int transparent) throws IOException
setIpTransparentback to summary
pack-priv void setIpTransparent(boolean enabled) throws IOException
setIpTransparentback to summary
private static native void setIpTransparent(int fd, int transparent) throws IOException
setLoopbackModeDisabledback to summary
pack-priv void setLoopbackModeDisabled(boolean loopbackModeDisabled) throws IOException
setNetworkInterfaceback to summary
pack-priv void setNetworkInterface(NetworkInterface netInterface) throws IOException
setSoBusyPollback to summary
pack-priv void setSoBusyPoll(int loopMicros) throws IOException
setSoBusyPollback to summary
private static native void setSoBusyPoll(int fd, int loopMicros) throws IOException
setTcpCorkback to summary
pack-priv void setTcpCork(boolean tcpCork) throws IOException
setTcpCorkback to summary
private static native void setTcpCork(int fd, int tcpCork) throws IOException
setTcpDeferAcceptback to summary
pack-priv void setTcpDeferAccept(int deferAccept) throws IOException
setTcpDeferAcceptback to summary
private static native void setTcpDeferAccept(int fd, int deferAccept) throws IOException
setTcpFastOpenback to summary
pack-priv void setTcpFastOpen(int tcpFastopenBacklog) throws IOException
setTcpFastOpenback to summary
private static native void setTcpFastOpen(int fd, int tcpFastopenBacklog) throws IOException
setTcpKeepCntback to summary
pack-priv void setTcpKeepCnt(int probes) throws IOException
setTcpKeepCntback to summary
private static native void setTcpKeepCnt(int fd, int probes) throws IOException
setTcpKeepIdleback to summary
pack-priv void setTcpKeepIdle(int seconds) throws IOException
setTcpKeepIdleback to summary
private static native void setTcpKeepIdle(int fd, int seconds) throws IOException
setTcpKeepIntvlback to summary
pack-priv void setTcpKeepIntvl(int seconds) throws IOException
setTcpKeepIntvlback to summary
private static native void setTcpKeepIntvl(int fd, int seconds) throws IOException
setTcpMd5Sigback to summary
pack-priv void setTcpMd5Sig(InetAddress address, byte[] key) throws IOException
setTcpMd5Sigback to summary
private static native void setTcpMd5Sig(int fd, boolean ipv6, byte[] address, int scopeId, byte[] key) throws IOException
setTcpNotSentLowAtback to summary
pack-priv void setTcpNotSentLowAt(long tcpNotSentLowAt) throws IOException
setTcpNotSentLowAtback to summary
private static native void setTcpNotSentLowAt(int fd, int tcpNotSentLowAt) throws IOException
setTcpQuickAckback to summary
pack-priv void setTcpQuickAck(boolean quickAck) throws IOException
setTcpQuickAckback to summary
private static native void setTcpQuickAck(int fd, int quickAck) throws IOException
setTcpUserTimeoutback to summary
pack-priv void setTcpUserTimeout(int milliseconds) throws IOException
setTcpUserTimeoutback to summary
private static native void setTcpUserTimeout(int fd, int milliseconds) throws IOException
setTimeToLiveback to summary
pack-priv void setTimeToLive(int ttl) throws IOException
setTimeToLiveback to summary
private static native void setTimeToLive(int fd, int ttl) throws IOException
setUdpGroback to summary
pack-priv void setUdpGro(boolean gro) throws IOException
setUdpGroback to summary
private static native void setUdpGro(int fd, int gro) throws IOException
unsafeInetAddrByNameback to summary
private static InetAddress unsafeInetAddrByName(String inetName)