From cf4df58e02c9cf0ffef1edefc9e9545570015514 Mon Sep 17 00:00:00 2001 From: SmallChi <564952747@qq.com> Date: Thu, 27 Dec 2018 22:03:04 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=95=B4=E5=90=88808=E8=A7=A3=E7=A0=81?= =?UTF-8?q?=E5=99=A8=202.=E5=A2=9E=E5=8A=A0=E5=9F=BA=E4=BA=8Etcp=E5=92=8Cu?= =?UTF-8?q?dp=E7=9A=84=E4=BC=9A=E8=AF=9D=E5=8F=8A=E4=B8=8B=E5=8F=91?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=203.=E5=B0=86webapi?= =?UTF-8?q?=E7=9A=84url=E6=8E=A5=E5=8F=A3=E7=A7=BB=E5=85=A5=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E7=B1=BB=E4=B8=AD=E4=BE=BF=E4=BA=8E=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JT808.DotNetty.Codecs.csproj | 26 ------------------- src/JT808.DotNetty.Codecs/JT808TcpDecoder.cs | 20 -------------- src/JT808.DotNetty.Codecs/JT808UdpDecoder.cs | 20 -------------- 3 files changed, 66 deletions(-) delete mode 100644 src/JT808.DotNetty.Codecs/JT808.DotNetty.Codecs.csproj delete mode 100644 src/JT808.DotNetty.Codecs/JT808TcpDecoder.cs delete mode 100644 src/JT808.DotNetty.Codecs/JT808UdpDecoder.cs diff --git a/src/JT808.DotNetty.Codecs/JT808.DotNetty.Codecs.csproj b/src/JT808.DotNetty.Codecs/JT808.DotNetty.Codecs.csproj deleted file mode 100644 index 56628c4..0000000 --- a/src/JT808.DotNetty.Codecs/JT808.DotNetty.Codecs.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - netstandard2.0 - 7.1 - Copyright 2018. - SmallChi - JT808.DotNetty.Codecs - JT808.DotNetty.Codecs - 基于DotNetty实现的JT808DotNetty的编解码库 - 基于DotNetty实现的JT808DotNetty的编解码库 - false - https://github.com/SmallChi/JT808DotNetty - https://github.com/SmallChi/JT808DotNetty - https://github.com/SmallChi/JT808DotNetty/blob/master/LICENSE - true - 1.0.0 - - - - - - - - - diff --git a/src/JT808.DotNetty.Codecs/JT808TcpDecoder.cs b/src/JT808.DotNetty.Codecs/JT808TcpDecoder.cs deleted file mode 100644 index 376194e..0000000 --- a/src/JT808.DotNetty.Codecs/JT808TcpDecoder.cs +++ /dev/null @@ -1,20 +0,0 @@ -using DotNetty.Buffers; -using DotNetty.Codecs; -using System.Collections.Generic; -using JT808.Protocol; -using DotNetty.Transport.Channels; - -namespace JT808.DotNetty.Codecs -{ - public class JT808TcpDecoder : ByteToMessageDecoder - { - protected override void Decode(IChannelHandlerContext context, IByteBuffer input, List output) - { - byte[] buffer = new byte[input.Capacity + 2]; - input.ReadBytes(buffer, 1, input.Capacity); - buffer[0] = JT808Package.BeginFlag; - buffer[input.Capacity + 1] = JT808Package.EndFlag; - output.Add(buffer); - } - } -} diff --git a/src/JT808.DotNetty.Codecs/JT808UdpDecoder.cs b/src/JT808.DotNetty.Codecs/JT808UdpDecoder.cs deleted file mode 100644 index fcf3455..0000000 --- a/src/JT808.DotNetty.Codecs/JT808UdpDecoder.cs +++ /dev/null @@ -1,20 +0,0 @@ -using DotNetty.Buffers; -using DotNetty.Codecs; -using DotNetty.Transport.Channels; -using System.Collections.Generic; -using DotNetty.Transport.Channels.Sockets; -using JT808.DotNetty.Core.Metadata; - -namespace JT808.DotNetty.Codecs -{ - public class JT808UdpDecoder : MessageToMessageDecoder - { - protected override void Decode(IChannelHandlerContext context, DatagramPacket message, List output) - { - IByteBuffer byteBuffer = message.Content; - byte[] buffer = new byte[byteBuffer.ReadableBytes]; - byteBuffer.ReadBytes(buffer); - output.Add(new JT808UdpPackage(buffer, message.Sender)); - } - } -}