Example usage for io.netty.handler.codec LengthFieldBasedFrameDecoder LengthFieldBasedFrameDecoder

List of usage examples for io.netty.handler.codec LengthFieldBasedFrameDecoder LengthFieldBasedFrameDecoder

Introduction

In this page you can find the example usage for io.netty.handler.codec LengthFieldBasedFrameDecoder LengthFieldBasedFrameDecoder.

Prototype

public LengthFieldBasedFrameDecoder(ByteOrder byteOrder, int maxFrameLength, int lengthFieldOffset,
        int lengthFieldLength, int lengthAdjustment, int initialBytesToStrip, boolean failFast) 

Source Link

Document

Creates a new instance.

Usage

From source file:org.traccar.protocol.SatsolProtocol.java

License:Apache License

public SatsolProtocol() {
    addServer(new TrackerServer(false, getName()) {
        @Override/*from w  ww .  j  a va  2 s.c o m*/
        protected void addProtocolHandlers(PipelineBuilder pipeline) {
            pipeline.addLast(new LengthFieldBasedFrameDecoder(ByteOrder.LITTLE_ENDIAN, 1400, 8, 2, 0, 0, true));
            pipeline.addLast(new SatsolProtocolDecoder(SatsolProtocol.this));
        }
    });
}