aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/TeraTrackProtocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-03-05 09:08:38 -0800
committerAnton Tananaev <anton@traccar.org>2022-03-05 09:08:38 -0800
commit5b5f99f93324e2e5776523ac9b339d49d5baf031 (patch)
tree041b4cc71cf651d2f3397a07b17d0e5a1e93f0ce /src/main/java/org/traccar/protocol/TeraTrackProtocol.java
parent18d8ec9610944aee95aa01ffbe402f3d0c30c39a (diff)
downloadtrackermap-server-5b5f99f93324e2e5776523ac9b339d49d5baf031.tar.gz
trackermap-server-5b5f99f93324e2e5776523ac9b339d49d5baf031.tar.bz2
trackermap-server-5b5f99f93324e2e5776523ac9b339d49d5baf031.zip
Fix frame decoder
Diffstat (limited to 'src/main/java/org/traccar/protocol/TeraTrackProtocol.java')
-rw-r--r--src/main/java/org/traccar/protocol/TeraTrackProtocol.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/protocol/TeraTrackProtocol.java b/src/main/java/org/traccar/protocol/TeraTrackProtocol.java
index 87d84be44..0303b4b5a 100644
--- a/src/main/java/org/traccar/protocol/TeraTrackProtocol.java
+++ b/src/main/java/org/traccar/protocol/TeraTrackProtocol.java
@@ -15,9 +15,8 @@
*/
package org.traccar.protocol;
-import io.netty.handler.codec.http.HttpObjectAggregator;
-import io.netty.handler.codec.http.HttpRequestDecoder;
-import io.netty.handler.codec.http.HttpResponseEncoder;
+import io.netty.handler.codec.string.StringDecoder;
+import io.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
import org.traccar.PipelineBuilder;
import org.traccar.TrackerServer;
@@ -28,9 +27,9 @@ public class TeraTrackProtocol extends BaseProtocol {
addServer(new TrackerServer(false, getName()) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline) {
- pipeline.addLast(new HttpResponseEncoder());
- pipeline.addLast(new HttpRequestDecoder());
- pipeline.addLast(new HttpObjectAggregator(65535));
+ pipeline.addLast(new JsonFrameDecoder());
+ pipeline.addLast(new StringEncoder());
+ pipeline.addLast(new StringDecoder());
pipeline.addLast(new TeraTrackProtocolDecoder(TeraTrackProtocol.this));
}
});