diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-08-25 04:35:31 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-08-25 04:35:31 +1200 |
commit | 0a98a11fce24cde2904cadcfee3a0c9ac0044fe7 (patch) | |
tree | daa658eb20294ce15bc240c06d6c4c73ae8ab1f2 | |
parent | aec8f66aa1c1f0f8364ed4b59ddc196a939c6fed (diff) | |
download | traccar-server-0a98a11fce24cde2904cadcfee3a0c9ac0044fe7.tar.gz traccar-server-0a98a11fce24cde2904cadcfee3a0c9ac0044fe7.tar.bz2 traccar-server-0a98a11fce24cde2904cadcfee3a0c9ac0044fe7.zip |
Add UDP support for Xirgo protocol
-rw-r--r-- | src/org/traccar/protocol/XirgoProtocol.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/XirgoProtocol.java b/src/org/traccar/protocol/XirgoProtocol.java index f186c731f..c5ef27f54 100644 --- a/src/org/traccar/protocol/XirgoProtocol.java +++ b/src/org/traccar/protocol/XirgoProtocol.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -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.string.StringDecoder; @@ -42,6 +43,14 @@ public class XirgoProtocol extends BaseProtocol { pipeline.addLast("objectDecoder", new XirgoProtocolDecoder(XirgoProtocol.this)); } }); + serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) { + @Override + protected void addSpecificHandlers(ChannelPipeline pipeline) { + pipeline.addLast("stringEncoder", new StringEncoder()); + pipeline.addLast("stringDecoder", new StringDecoder()); + pipeline.addLast("objectDecoder", new XirgoProtocolDecoder(XirgoProtocol.this)); + } + }); } } |