Class 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 Detail

      • processRead

        public void processRead​(int attemptedBytesRead,
                                int actualBytesRead,
                                Object message)
        Process the read message and fire it through the ChannelPipeline
        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 or null if none was read.
      • allocateBuffer

        public io.netty5.buffer.Buffer allocateBuffer()
        Allocate a Buffer with a capacity that is probably large enough to read all inbound data and small enough not to waste space.
        Returns:
        the allocated Buffer.