From 299e1116d2b59b015350d46235a483eb8239e7d0 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 13 Jul 2015 16:56:46 +1200 Subject: Enable UDP for Meiligao (fix #293) --- src/org/traccar/protocol/MeiligaoProtocol.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/org/traccar') diff --git a/src/org/traccar/protocol/MeiligaoProtocol.java b/src/org/traccar/protocol/MeiligaoProtocol.java index 36e1adb6d..70c9a87ec 100644 --- a/src/org/traccar/protocol/MeiligaoProtocol.java +++ b/src/org/traccar/protocol/MeiligaoProtocol.java @@ -15,8 +15,11 @@ */ package org.traccar.protocol; +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.StringDecoder; +import org.jboss.netty.handler.codec.string.StringEncoder; import org.traccar.BaseProtocol; import org.traccar.TrackerServer; @@ -37,6 +40,12 @@ public class MeiligaoProtocol extends BaseProtocol { pipeline.addLast("objectDecoder", new MeiligaoProtocolDecoder(MeiligaoProtocol.this)); } }); + serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) { + @Override + protected void addSpecificHandlers(ChannelPipeline pipeline) { + pipeline.addLast("objectDecoder", new MeiligaoProtocolDecoder(MeiligaoProtocol.this)); + } + }); } } -- cgit v1.2.3