aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorke5stl <ke5stl@gmail.com>2015-05-26 22:31:38 -0500
committerke5stl <ke5stl@gmail.com>2015-05-26 22:31:38 -0500
commit4ab59885ac7e00acbf45a3562ef2c4bf5b89140d (patch)
treeb0ba5494037f85f8e42f14331a7b1296f3f780f9 /src/org
parent3ebc5ac0df8a8301501d566c42f983e7c2214af8 (diff)
downloadtraccar-server-4ab59885ac7e00acbf45a3562ef2c4bf5b89140d.tar.gz
traccar-server-4ab59885ac7e00acbf45a3562ef2c4bf5b89140d.tar.bz2
traccar-server-4ab59885ac7e00acbf45a3562ef2c4bf5b89140d.zip
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.
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/ServerManager.java11
1 files changed, 11 insertions, 0 deletions
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));
+ }
+ });
}
}