Package io.netty.channel.udt

Examples of io.netty.channel.udt.UdtMessage.content()


    @Override
    protected boolean doWriteMessage(Object msg, ChannelOutboundBuffer in) throws Exception {
        // expects a message
        final UdtMessage message = (UdtMessage) msg;

        final ByteBuf byteBuf = message.content();

        final int messageSize = byteBuf.readableBytes();

        final long writtenBytes;
        if (byteBuf.nioBufferCount() == 1) {
View Full Code Here


    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
        UdtMessage udtMsg = (UdtMessage) msg;
        if (meter != null) {
            meter.mark(udtMsg.content().readableBytes());
        }
        ctx.writeAndFlush(msg);
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.