From 4ab59885ac7e00acbf45a3562ef2c4bf5b89140d Mon Sep 17 00:00:00 2001 From: ke5stl Date: Tue, 26 May 2015 22:31:38 -0500 Subject: Update ServerManager.java allow the Queclink GL200 to support UDP as well as TCP connections. GL300 model devices (compatible with GL200 protocol, it seems) support UDP mode as well as TCP. UDP uses less battery though, so may allow the device to run a little bit longer on a charge. --- src/org/traccar/ServerManager.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/org') diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java index 6e398b87a..6ea91d860 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -239,6 +239,17 @@ public class ServerManager { pipeline.addLast("objectDecoder", new Gl200ProtocolDecoder(protocol)); } }); + + serverList.add(new TrackerServer(new ConnectionlessBootstrap(), protocol) { + @Override + protected void addSpecificHandlers(ChannelPipeline pipeline) { + + pipeline.addLast("frameDecoder",new CharacterDelimiterFrameDecoder(1024, "$", "\0")); + pipeline.addLast("stringDecoder", new StringDecoder()); + pipeline.addLast("stringEncoder", new StringEncoder()); + pipeline.addLast("objectDecoder", new Gl200ProtocolDecoder(protocol)); + } + }); } } -- cgit v1.2.3 From 47e2a74fd0fb555ff9aa784f82ab7f6764e55907 Mon Sep 17 00:00:00 2001 From: ke5stl Date: Thu, 28 May 2015 09:12:08 -0500 Subject: Update ServerManager.java Remove unneeded frameDecoder for UDP. thank you for looking! --- src/org/traccar/ServerManager.java | 1 - 1 file changed, 1 deletion(-) (limited to 'src/org') diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java index 6ea91d860..9e5da51b1 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -244,7 +244,6 @@ public class ServerManager { @Override protected void addSpecificHandlers(ChannelPipeline pipeline) { - pipeline.addLast("frameDecoder",new CharacterDelimiterFrameDecoder(1024, "$", "\0")); pipeline.addLast("stringDecoder", new StringDecoder()); pipeline.addLast("stringEncoder", new StringEncoder()); pipeline.addLast("objectDecoder", new Gl200ProtocolDecoder(protocol)); -- cgit v1.2.3