Example usage for io.netty.channel.sctp SctpMessage isUnordered

List of usage examples for io.netty.channel.sctp SctpMessage isUnordered

Introduction

In this page you can find the example usage for io.netty.channel.sctp SctpMessage isUnordered.

Prototype

public boolean isUnordered() 

Source Link

Document

return the unordered flag

Usage

From source file:org.mobicents.protocols.sctp.netty.NettySctpChannelInboundHandlerAdapter.java

License:Open Source License

@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) {
    // try {//  w  w  w  .  ja v  a2s.co  m
    PayloadData payload;
    if (this.association.getIpChannelType() == IpChannelType.SCTP) {
        SctpMessage sctpMessage = (SctpMessage) msg;
        ByteBuf byteBuf = sctpMessage.content();
        payload = new PayloadData(byteBuf.readableBytes(), byteBuf, sctpMessage.isComplete(),
                sctpMessage.isUnordered(), sctpMessage.protocolIdentifier(), sctpMessage.streamIdentifier());
    } else {
        ByteBuf byteBuf = (ByteBuf) msg;
        payload = new PayloadData(byteBuf.readableBytes(), byteBuf, true, false, 0, 0);
    }

    if (logger.isDebugEnabled()) {
        logger.debug(String.format("Rx : Ass=%s %s", this.association.getName(), payload));
    }

    this.association.read(payload);
    // } finally {
    // ReferenceCountUtil.release(msg);
    // }
}