diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-10-21 20:26:45 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-10-21 20:26:45 -0700 |
commit | 36bcdfc80dc19bc932f03bc8a0da056f46023304 (patch) | |
tree | cdee146ba681fdaa3ce262026d28cd0d7ba7f550 /src/main/java/org/traccar/protocol/HoopoProtocol.java | |
parent | 7f1cb863872c01aaf7defa8164940b729eb86b77 (diff) | |
download | traccar-server-36bcdfc80dc19bc932f03bc8a0da056f46023304.tar.gz traccar-server-36bcdfc80dc19bc932f03bc8a0da056f46023304.tar.bz2 traccar-server-36bcdfc80dc19bc932f03bc8a0da056f46023304.zip |
Expect TCP JSON data
Diffstat (limited to 'src/main/java/org/traccar/protocol/HoopoProtocol.java')
-rw-r--r-- | src/main/java/org/traccar/protocol/HoopoProtocol.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/protocol/HoopoProtocol.java b/src/main/java/org/traccar/protocol/HoopoProtocol.java index d47327ad8..387b967d3 100644 --- a/src/main/java/org/traccar/protocol/HoopoProtocol.java +++ b/src/main/java/org/traccar/protocol/HoopoProtocol.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 HoopoProtocol 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 HoopoProtocolDecoder(HoopoProtocol.this)); } }); |