aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrecchia <danilo@deltatecnologia.com>2016-07-05 16:42:14 -0300
committerdrecchia <danilo@deltatecnologia.com>2016-07-05 16:42:14 -0300
commit7a47baa3c6122ef18f174c52476dc5ca9bc8177e (patch)
treea4e73047e13edff5ed21c454b9efc76580a73403 /src
parentbcc20a915c61d7a86fd19b03ec1ab55ac5cf8527 (diff)
downloadtrackermap-server-7a47baa3c6122ef18f174c52476dc5ca9bc8177e.tar.gz
trackermap-server-7a47baa3c6122ef18f174c52476dc5ca9bc8177e.tar.bz2
trackermap-server-7a47baa3c6122ef18f174c52476dc5ca9bc8177e.zip
- Added UDP support for Astra K protocol.
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/AstraProtocol.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/AstraProtocol.java b/src/org/traccar/protocol/AstraProtocol.java
index d0b1d47a5..8498a766a 100644
--- a/src/org/traccar/protocol/AstraProtocol.java
+++ b/src/org/traccar/protocol/AstraProtocol.java
@@ -15,6 +15,7 @@
*/
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.frame.LengthFieldBasedFrameDecoder;
@@ -38,6 +39,13 @@ public class AstraProtocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new AstraProtocolDecoder(AstraProtocol.this));
}
});
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 1, 2, -3, 0));
+ pipeline.addLast("objectDecoder", new AstraProtocolDecoder(AstraProtocol.this));
+ }
+ });
}
}