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