From d099a65ce3f5f8ed9ba345f8f3bdcf617fa4af75 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 08 十一月 2023 09:55:40 +0800
Subject: [PATCH] 更改udp

---
 HDL_ON/DAL/DriverLayer/Packet.cs |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/HDL_ON/DAL/DriverLayer/Packet.cs b/HDL_ON/DAL/DriverLayer/Packet.cs
index 0e8f8dc..99f46b8 100644
--- a/HDL_ON/DAL/DriverLayer/Packet.cs
+++ b/HDL_ON/DAL/DriverLayer/Packet.cs
@@ -12,11 +12,11 @@
     /// </summary>
     public class Packet
     {
-        /// <summary>
-        /// 缂撳啿鍖哄ぇ灏�
-        /// Link鍗忚鐜板湪涓�涓寘鐨勬暟鎹瘮杈冨ぇ锛岀紦鍐插尯澶皬瀛樹笉瀹屽叏閮ㄦ暟鎹� 2023-07-14 16:03:56  wxr
-        /// </summary>
-        public const int Size = 1024 * 10;
+        ///// <summary>
+        ///// 缂撳啿鍖哄ぇ灏�
+        ///// Link鍗忚鐜板湪涓�涓寘鐨勬暟鎹瘮杈冨ぇ锛岀紦鍐插尯澶皬瀛樹笉瀹屽叏閮ㄦ暟鎹� 2023-07-14 16:03:56  wxr
+        ///// </summary>
+        //public const int Size = 2000;
 
         /// <summary>
         /// 鎺ユ敹鍒扮殑鏁版嵁
@@ -28,11 +28,15 @@
         /// </summary>
         public System.Net.EndPoint RemoteEndPoint;
 
-        public Packet()
+        public Packet(int lenght)
         {
-            this.Bytes = new byte[Size];
+            this.Bytes = new byte[lenght];
+           
             RemoteEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Any, 0);
         }
+
+
+
         public Packet(byte[] data, System.Net.EndPoint remoteEndPoint)
         {
             this.Bytes = data;

--
Gitblit v1.8.0