Class UnixChannelUtil
java.lang.Object
io.netty.channel.unix.UnixChannelUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic InetSocketAddresscomputeRemoteAddr(InetSocketAddress remoteAddr, InetSocketAddress osRemoteAddr) static booleandeleteDomainSocketFile(String path) Delete the file atpathbut only if it is a socket inode (as left behind by a bound domain socket).static booleanisBufferCopyNeededForWrite(ByteBuf byteBuf) Checks if the specified buffer has memory address or is composed of n(n invalid input: '<'= IOV_MAX) NIO direct buffers.static booleanisFileChannelImpl(FileChannel channel) Returns whether the given channel is an instance ofsun.nio.ch.FileChannelImpl.
-
Method Details
-
isFileChannelImpl
Returns whether the given channel is an instance ofsun.nio.ch.FileChannelImpl. -
isBufferCopyNeededForWrite
Checks if the specified buffer has memory address or is composed of n(n invalid input: '<'= IOV_MAX) NIO direct buffers. (We check this because otherwise we need to make it a new direct buffer.) -
deleteDomainSocketFile
Delete the file atpathbut only if it is a socket inode (as left behind by a bound domain socket). Any other kind of file (regular file, directory, symbolic link, FIFO, device, ...) is left alone. Symbolic links are never followed.- Returns:
trueif the file was deleted.
-
computeRemoteAddr
public static InetSocketAddress computeRemoteAddr(InetSocketAddress remoteAddr, InetSocketAddress osRemoteAddr)
-