aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/DingtekProtocol.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/DingtekProtocol.java')
-rw-r--r--src/main/java/org/traccar/protocol/DingtekProtocol.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/DingtekProtocol.java b/src/main/java/org/traccar/protocol/DingtekProtocol.java
index 31962202c..cf2a6c0f5 100644
--- a/src/main/java/org/traccar/protocol/DingtekProtocol.java
+++ b/src/main/java/org/traccar/protocol/DingtekProtocol.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
+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;
@@ -26,7 +27,9 @@ public class DingtekProtocol extends BaseProtocol {
addServer(new TrackerServer(false, getName()) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline) {
- pipeline.addLast(new LengthFieldBasedFrameDecoder(1024, 4, 1));
+ pipeline.addLast(new DingtekFrameDecoder());
+ pipeline.addLast(new StringDecoder());
+ pipeline.addLast(new StringEncoder());
pipeline.addLast(new DingtekProtocolDecoder(DingtekProtocol.this));
}
});