aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-07-21 15:38:31 -0700
committerAnton Tananaev <anton@traccar.org>2022-07-21 18:31:08 -0700
commit1b07425955baf2c37216a05a0fdf6afe6258f6d7 (patch)
treef3f4b4ef25002ec690b06ae8ff9b191e0aba5469 /src/main
parent63dbc22b68d4825dcf36a5c694456c9ea267ebfc (diff)
downloadtrackermap-server-1b07425955baf2c37216a05a0fdf6afe6258f6d7.tar.gz
trackermap-server-1b07425955baf2c37216a05a0fdf6afe6258f6d7.tar.bz2
trackermap-server-1b07425955baf2c37216a05a0fdf6afe6258f6d7.zip
Add Arknav UDP support (fix #4708)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/ArknavProtocol.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/ArknavProtocol.java b/src/main/java/org/traccar/protocol/ArknavProtocol.java
index ed38f26d7..4f443aa3a 100644
--- a/src/main/java/org/traccar/protocol/ArknavProtocol.java
+++ b/src/main/java/org/traccar/protocol/ArknavProtocol.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 - 2018 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 - 2022 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,6 +38,15 @@ public class ArknavProtocol extends BaseProtocol {
pipeline.addLast(new ArknavProtocolDecoder(ArknavProtocol.this));
}
});
+ addServer(new TrackerServer(config, getName(), true) {
+ @Override
+ protected void addProtocolHandlers(PipelineBuilder pipeline, Config config) {
+ pipeline.addLast(new StringDecoder());
+ pipeline.addLast(new StringEncoder());
+ pipeline.addLast(new ArknavProtocolDecoder(ArknavProtocol.this));
+ }
+ });
+
}
}