diff options
Diffstat (limited to 'src/org/traccar/protocol/MeitrackProtocol.java')
-rw-r--r-- | src/org/traccar/protocol/MeitrackProtocol.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/MeitrackProtocol.java b/src/org/traccar/protocol/MeitrackProtocol.java index 6f452aa33..c957d4ea1 100644 --- a/src/org/traccar/protocol/MeitrackProtocol.java +++ b/src/org/traccar/protocol/MeitrackProtocol.java @@ -17,6 +17,8 @@ package org.traccar.protocol; import java.nio.ByteOrder; import java.util.List; + +import org.jboss.netty.bootstrap.ConnectionlessBootstrap; import org.jboss.netty.bootstrap.ServerBootstrap; import org.jboss.netty.channel.ChannelPipeline; import org.jboss.netty.handler.codec.string.StringEncoder; @@ -47,6 +49,15 @@ public class MeitrackProtocol extends BaseProtocol { }; server.setEndianness(ByteOrder.LITTLE_ENDIAN); serverList.add(server); + server = new TrackerServer(new ConnectionlessBootstrap(), this.getName()) { + @Override + protected void addSpecificHandlers(ChannelPipeline pipeline) { + pipeline.addLast("stringEncoder", new StringEncoder()); + pipeline.addLast("objectDecoder", new MeitrackProtocolDecoder(MeitrackProtocol.this)); + } + }; + server.setEndianness(ByteOrder.LITTLE_ENDIAN); + serverList.add(server); } } |