25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

21 satır
601 B

  1. using DotNetty.Buffers;
  2. using DotNetty.Codecs;
  3. using System.Collections.Generic;
  4. using DotNetty.Transport.Channels;
  5. using JT1078.Protocol;
  6. using System;
  7. namespace JT1078.Gateway.Codecs
  8. {
  9. public class JT1078TcpDecoder : ByteToMessageDecoder
  10. {
  11. protected override void Decode(IChannelHandlerContext context, IByteBuffer input, List<object> output)
  12. {
  13. byte[] buffer = new byte[input.Capacity+4];
  14. input.ReadBytes(buffer, 4, input.Capacity);
  15. Array.Copy(JT1078Package.FH_Bytes, 0,buffer, 0, 4);
  16. output.Add(buffer);
  17. }
  18. }
  19. }