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
Fields inherited from class Socket
ipv6, UDS_SUN_PATH_SIZEModifier and TypeFieldDescriptionprotected final booleanstatic final intDeprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidbindVSock(VSockAddress address) booleanconnectVSock(VSockAddress address) static LinuxSocketnewSocket(int fd) static LinuxSocketstatic LinuxSocketnewSocketDgram(boolean ipv6) static LinuxSocketnewSocketDgram(InternetProtocolFamily family) static LinuxSocketstatic LinuxSocketstatic LinuxSocketstatic LinuxSocketnewSocketStream(boolean ipv6) static LinuxSocketnewSocketStream(InternetProtocolFamily protocol) static LinuxSocketMethods inherited from class 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, useIpv6Modifier and TypeMethodDescriptionfinal intaccept(byte[] addr) final voidbind(SocketAddress socketAddress) final booleanconnect(SocketAddress socketAddress) final voidfinal booleanintgetIntOpt(int level, int optname) voidgetRawOpt(int level, int optname, ByteBuffer out) final intfinal intfinal intfinal intfinal intstatic voidfinal booleanfinal booleanstatic booleanfinal booleanfinal booleanfinal booleanfinal booleanfinal booleanfinal booleanfinal voidlisten(int backlog) final InetSocketAddressfinal DomainSocketAddressprotected static intprotected static intnewSocketDgram0(boolean ipv6) protected static intprotected static intprotected static intprotected static intprotected static intnewSocketStream0(boolean ipv6) protected static intnewSocketStream0(InternetProtocolFamily protocol) intrecv(ByteBuffer buf, int pos, int limit) intrecvAddress(long address, int pos, int limit) final intrecvFd()final DatagramSocketAddressrecvFrom(ByteBuffer buf, int pos, int limit) final DatagramSocketAddressrecvFromAddress(long memoryAddress, int pos, int limit) recvFromAddressDomainSocket(long memoryAddress, int pos, int limit) recvFromDomainSocket(ByteBuffer buf, int pos, int limit) final InetSocketAddressfinal DomainSocketAddressintsend(ByteBuffer buf, int pos, int limit) intsendAddress(long address, int pos, int limit) final intsendFd(int fdToSend) final intsendTo(ByteBuffer buf, int pos, int limit, InetAddress addr, int port) final intsendTo(ByteBuffer buf, int pos, int limit, InetAddress addr, int port, boolean fastOpen) final intsendToAddress(long memoryAddress, int pos, int limit, InetAddress addr, int port) final intsendToAddress(long memoryAddress, int pos, int limit, InetAddress addr, int port, boolean fastOpen) final intsendToAddressDomainSocket(long memoryAddress, int pos, int limit, byte[] path) final intsendToAddresses(long memoryAddress, int length, InetAddress addr, int port) final intsendToAddresses(long memoryAddress, int length, InetAddress addr, int port, boolean fastOpen) final intsendToAddressesDomainSocket(long memoryAddress, int length, byte[] path) final intsendToDomainSocket(ByteBuffer buf, int pos, int limit, byte[] path) final voidsetBroadcast(boolean broadcast) voidsetIntOpt(int level, int optname, int optvalue) final voidsetKeepAlive(boolean keepAlive) voidsetRawOpt(int level, int optname, ByteBuffer optvalue) final voidsetReceiveBufferSize(int receiveBufferSize) final voidsetReuseAddress(boolean reuseAddress) final voidsetReusePort(boolean reusePort) final voidsetSendBufferSize(int sendBufferSize) final voidsetSoLinger(int soLinger) final voidsetTcpNoDelay(boolean tcpNoDelay) final voidsetTrafficClass(int trafficClass) static booleanshouldUseIpv6(InternetProtocolFamily family) final voidshutdown()final voidshutdown(boolean read, boolean write) toString()protected static booleanuseIpv6(Socket socket, InetAddress address) Returnstrueif the given socket and address combination should use IPv6 internally,falseotherwise.Methods inherited from class FileDescriptor
close, equals, from, from, hashCode, intValue, isOpen, markClosed, pipe, read, readAddress, write, writeAddress, writev, writevAddressesModifier and TypeMethodDescriptionvoidclose()Close the file descriptor.booleanstatic FileDescriptorOpen a newFileDescriptorfor the givenFile.static FileDescriptorOpen a newFileDescriptorfor the given path.inthashCode()final intintValue()Return the int value of the filedescriptor.booleanisOpen()Returnstrueif the file descriptor is open.protected booleanstatic FileDescriptor[]pipe()final intread(ByteBuffer buf, int pos, int limit) final intreadAddress(long address, int pos, int limit) final intwrite(ByteBuffer buf, int pos, int limit) final intwriteAddress(long address, int pos, int limit) final longwritev(ByteBuffer[] buffers, int offset, int length, long maxBytesToWrite) final longwritevAddresses(long memoryAddress, int length)
-
Method Details
-
bindVSock
- Throws:
IOException
-
connectVSock
- Throws:
IOException
-
remoteVSockAddress
-
localVSockAddress
-
newSocket
-
newVSockStream
-
newSocketStream
-
newSocketStream
-
newSocketStream
-
newSocketDgram
-
newSocketDgram
-
newSocketDgram
-
newSocketDomain
-
newSocketDomainDgram
-