- java.lang.Object
-
- io.netty5.channel.AbstractChannel.ReadSink
-
- Enclosing class:
- AbstractChannel<P extends Channel,L extends SocketAddress,R extends SocketAddress>
protected final class AbstractChannel.ReadSink extends Object
Sink that will be used by#doReadNow(ReadSink)implementations to perform the actual read from the underlying transport (for example a socket).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty5.buffer.BufferallocateBuffer()Allocate aBufferwith a capacity that is probably large enough to read all inbound data and small enough not to waste space.voidprocessRead(int attemptedBytesRead, int actualBytesRead, Object message)Process the read message and fire it through theChannelPipeline
-
-
-
Method Detail
-
processRead
public void processRead(int attemptedBytesRead, int actualBytesRead, Object message)Process the read message and fire it through theChannelPipeline- Parameters:
attemptedBytesRead- The number of bytes the read operation did attempt to read.actualBytesRead- The number of bytes the read operation actually read.message- the read message ornullif none was read.
-
allocateBuffer
public io.netty5.buffer.Buffer allocateBuffer()
Allocate aBufferwith a capacity that is probably large enough to read all inbound data and small enough not to waste space.- Returns:
- the allocated
Buffer.
-
-