Class IoUringDomainSocketChannel.IoUringDomainSocketUnsafe
java.lang.Object
io.netty.channel.AbstractChannel.AbstractUnsafe
io.netty.channel.uring.AbstractIoUringChannel.AbstractUringUnsafe
io.netty.channel.uring.AbstractIoUringStreamChannel.IoUringStreamUnsafe
io.netty.channel.uring.IoUringDomainSocketChannel.IoUringDomainSocketUnsafe
- All Implemented Interfaces:
Channel.Unsafe, IoHandle, IoUringIoHandle, AutoCloseable
- Enclosing class:
IoUringDomainSocketChannel
private final class IoUringDomainSocketChannel.IoUringDomainSocketUnsafe
extends AbstractIoUringStreamChannel.IoUringStreamUnsafe
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) private IoUringIoOpsprepSendFdIoOps(FileDescriptor fileDescriptor, MsgHdrMemory msgHdrMemory) protected voidreadComplete0(byte op, int res, int flags, short data, int outstanding) Called once a read was completed.protected intscheduleRead0(boolean first, boolean socketIsEmpty) Schedule a read and returns the number ofAbstractIoUringChannel.AbstractUringUnsafe.readComplete(byte, int, int, short)calls that are expected because of the scheduled read.private intprotected intSchedule the write of a single message and returns the number ofAbstractIoUringChannel.AbstractUringUnsafe.writeComplete(byte, int, int, long)calls that are expected because of the scheduled write.voidCalled once thisIoHandlewas unregistered and so will not receive any more events viaIoHandle.handle(IoRegistration, IoEvent).(package private) booleanwriteComplete0(byte op, int res, int flags, long data, int outstanding) Called once a write was completed.Methods inherited from class AbstractIoUringStreamChannel.IoUringStreamUnsafe
filterWriteMultiple, handleReadException, scheduleWriteMultipleMethods inherited from class AbstractIoUringChannel.AbstractUringUnsafe
cancelComplete0, canCloseNow0, close, close, connectComplete, deregister, flush0, handle, isReadMultishot, recvBufAllocHandle, schedulePollIn, scheduleRead, shutdownInputMethods inherited from class AbstractChannel.AbstractUnsafe
annotateConnectException, beginRead, bind, close, closeForcibly, closeIfClosed, disconnect, ensureOpen, flush, handleWriteError, localAddress, outboundBuffer, prepareToClose, register, remoteAddress, safeSetFailure, safeSetSuccess, shutdownOutput, voidPromise, writeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IoHandle
registered
-
Field Details
-
writeMsgHdrMemory
-
readMsgHdrMemory
-
-
Constructor Details
-
IoUringDomainSocketUnsafe
private IoUringDomainSocketUnsafe()
-
-
Method Details
-
scheduleWriteSingle
Description copied from class:AbstractIoUringChannel.AbstractUringUnsafeSchedule the write of a single message and returns the number ofAbstractIoUringChannel.AbstractUringUnsafe.writeComplete(byte, int, int, long)calls that are expected because of the scheduled write.- Overrides:
scheduleWriteSinglein classAbstractIoUringStreamChannel.IoUringStreamUnsafe
-
writeComplete0
boolean writeComplete0(byte op, int res, int flags, long data, int outstanding) Description copied from class:AbstractIoUringChannel.AbstractUringUnsafeCalled once a write was completed.- Overrides:
writeComplete0in classAbstractIoUringStreamChannel.IoUringStreamUnsafe- Parameters:
op- the op coderes- the result.flags- the flags.data- the data that was passed when submitting the op.outstanding- the outstanding write completions.
-
prepSendFdIoOps
-
scheduleRead0
protected int scheduleRead0(boolean first, boolean socketIsEmpty) Description copied from class:AbstractIoUringChannel.AbstractUringUnsafeSchedule a read and returns the number ofAbstractIoUringChannel.AbstractUringUnsafe.readComplete(byte, int, int, short)calls that are expected because of the scheduled read.- Overrides:
scheduleRead0in classAbstractIoUringStreamChannel.IoUringStreamUnsafe- Parameters:
first-trueif this is the first read of a read loop.socketIsEmpty-trueif the socket is guaranteed to be empty,falseotherwise.- Returns:
- the number of
AbstractIoUringChannel.AbstractUringUnsafe.readComplete(byte, int, int, short)calls expected or-1ifAbstractIoUringChannel.AbstractUringUnsafe.readComplete(byte, int, int, short)is called until the read is cancelled (multi-shot).
-
scheduleRecvReadFd
private int scheduleRecvReadFd() -
readComplete0
protected void readComplete0(byte op, int res, int flags, short data, int outstanding) Description copied from class:AbstractIoUringChannel.AbstractUringUnsafeCalled once a read was completed.- Overrides:
readComplete0in classAbstractIoUringStreamChannel.IoUringStreamUnsafe
-
connect
public void connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) Description copied from interface:Channel.UnsafeConnect theChannelof the givenChannelFuturewith the given remoteSocketAddress. If a specific localSocketAddressshould be used it need to be given as argument. Otherwise just passnullto it. TheChannelPromisewill get notified once the connect operation was complete.- Specified by:
connectin interfaceChannel.Unsafe- Overrides:
connectin classAbstractIoUringChannel.AbstractUringUnsafe
-
unregistered
public void unregistered()Description copied from interface:IoHandleCalled once thisIoHandlewas unregistered and so will not receive any more events viaIoHandle.handle(IoRegistration, IoEvent).- Specified by:
unregisteredin interfaceIoHandle- Overrides:
unregisteredin classAbstractIoUringStreamChannel.IoUringStreamUnsafe
-