From ca6bed23fa621f7c0cbaa4b199272abc53525b53 Mon Sep 17 00:00:00 2001
From: SmallChi <564952747@qq.com>
Date: Mon, 26 Nov 2018 00:38:43 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AE=80=E5=8D=95tcp?=
=?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=AE=A2=E6=88=B7=E7=AB=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Codecs/JT808ClientDecoder.cs | 59 +++++++++++++++++++
src/JT808.DotNetty/JT808SimpleTcpClient.cs | 53 +++++++++++++++++
2 files changed, 112 insertions(+)
create mode 100644 src/JT808.DotNetty/Codecs/JT808ClientDecoder.cs
create mode 100644 src/JT808.DotNetty/JT808SimpleTcpClient.cs
diff --git a/src/JT808.DotNetty/Codecs/JT808ClientDecoder.cs b/src/JT808.DotNetty/Codecs/JT808ClientDecoder.cs
new file mode 100644
index 0000000..662ebff
--- /dev/null
+++ b/src/JT808.DotNetty/Codecs/JT808ClientDecoder.cs
@@ -0,0 +1,59 @@
+using DotNetty.Buffers;
+using DotNetty.Codecs;
+using DotNetty.Transport.Channels;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using JT808.Protocol;
+using JT808.DotNetty.Internal;
+using JT808.DotNetty.Interfaces;
+
+namespace JT808.DotNetty.Codecs
+{
+ ///
+ /// JT808客户端解码(测试客户端)
+ ///
+ internal class JT808ClientDecoder : ByteToMessageDecoder
+ {
+ private static readonly ILogger logger=new LoggerFactory().CreateLogger();
+
+ private static readonly JT808AtomicCounterService jT808AtomicCounterService=new JT808AtomicCounterService ();
+
+ protected override void Decode(IChannelHandlerContext context, IByteBuffer input, List