diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-06-16 10:59:07 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-06-16 10:59:07 +1200 |
commit | 5a26d7f00cdabed1518a184e3086b113a87f2819 (patch) | |
tree | 367853d5b2df87aa60957e84d024ddfdacbe215f /src | |
parent | d003da04e27f81959308ac80de8bf597b53bd537 (diff) | |
download | trackermap-server-5a26d7f00cdabed1518a184e3086b113a87f2819.tar.gz trackermap-server-5a26d7f00cdabed1518a184e3086b113a87f2819.tar.bz2 trackermap-server-5a26d7f00cdabed1518a184e3086b113a87f2819.zip |
Add UDP support for V680 protocol (fix #1982)
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/protocol/V680Protocol.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/V680Protocol.java b/src/org/traccar/protocol/V680Protocol.java index a89f77edd..d2ceb207b 100644 --- a/src/org/traccar/protocol/V680Protocol.java +++ b/src/org/traccar/protocol/V680Protocol.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; @@ -40,6 +41,13 @@ public class V680Protocol extends BaseProtocol { pipeline.addLast("objectDecoder", new V680ProtocolDecoder(V680Protocol.this)); } }); + serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) { + @Override + protected void addSpecificHandlers(ChannelPipeline pipeline) { + pipeline.addLast("stringDecoder", new StringDecoder()); + pipeline.addLast("objectDecoder", new V680ProtocolDecoder(V680Protocol.this)); + } + }); } } |