diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-09-24 10:30:11 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-09-24 10:30:11 +1200 |
commit | b15c19d95e5494ad91a9370669665b0ef6930160 (patch) | |
tree | 75053018e5cdb5c5bf17ccdcdd930ca2434e24b8 /src | |
parent | dc4e6d3e388dc0ba96b9e92a269aaf7e5cd3aa03 (diff) | |
download | trackermap-server-b15c19d95e5494ad91a9370669665b0ef6930160.tar.gz trackermap-server-b15c19d95e5494ad91a9370669665b0ef6930160.tar.bz2 trackermap-server-b15c19d95e5494ad91a9370669665b0ef6930160.zip |
Support UDP for Cellocator protocol
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/protocol/CellocatorProtocol.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/CellocatorProtocol.java b/src/org/traccar/protocol/CellocatorProtocol.java index 6d8eea8f5..69078cca0 100644 --- a/src/org/traccar/protocol/CellocatorProtocol.java +++ b/src/org/traccar/protocol/CellocatorProtocol.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; @@ -40,6 +43,15 @@ public class CellocatorProtocol extends BaseProtocol { }; server.setEndianness(ByteOrder.LITTLE_ENDIAN); serverList.add(server); + + server = new TrackerServer(new ConnectionlessBootstrap(), getName()) { + @Override + protected void addSpecificHandlers(ChannelPipeline pipeline) { + pipeline.addLast("objectDecoder", new CellocatorProtocolDecoder(CellocatorProtocol.this)); + } + }; + server.setEndianness(ByteOrder.LITTLE_ENDIAN); + serverList.add(server); } } |