处理一部分

This commit is contained in:
sin365 2024-04-15 11:26:56 +08:00
parent 1d710e7d8d
commit 8cbd509ffd
3 changed files with 4 additions and 56 deletions

View File

@ -43,58 +43,6 @@ namespace HaoYueNet.ServerNetworkNet4x
public static byte[] CreatePkgData(UInt16 CmdID, UInt16 Error, byte[] AddonBytes_Data) public static byte[] CreatePkgData(UInt16 CmdID, UInt16 Error, byte[] AddonBytes_Data)
{ {
//byte[] AddonBytes_CmdID = BitConverter.GetBytes(CmdID);
//byte[] AddonBytes_Error = BitConverter.GetBytes(Error);
//int AllLenght = AddonBytes_CmdID.Length + AddonBytes_Error.Length + AddonBytes_Data.Length + 4;
//int LastIndex = 0;
////包长度
//byte[] AddonBytes_Lenght = BitConverter.GetBytes(AllLenght);
//byte[] BufferData = new byte[AllLenght];
////包长度
//AddonBytes_Lenght.CopyTo(BufferData, LastIndex);
//LastIndex += AddonBytes_Lenght.Length;
////CMDID
//AddonBytes_CmdID.CopyTo(BufferData, LastIndex);
//LastIndex += AddonBytes_CmdID.Length;
////Error
//AddonBytes_Error.CopyTo(BufferData, LastIndex);
//LastIndex += AddonBytes_Error.Length;
////DATA
//AddonBytes_Data.CopyTo(BufferData, LastIndex);
//LastIndex += AddonBytes_Data.Length;
//return BufferData;
////用Buffer.BlockCopy拷贝
//byte[] AddonBytes_CmdID = BitConverter.GetBytes(CmdID);
//byte[] AddonBytes_Error = BitConverter.GetBytes(Error);
//int AllLenght = AddonBytes_CmdID.Length + AddonBytes_Error.Length + AddonBytes_Data.Length + 4;
//int LastIndex = 0;
////包长度
//byte[] AddonBytes_Lenght = BitConverter.GetBytes(AllLenght);
//byte[] BufferData = new byte[AllLenght];
////包长度
//Buffer.BlockCopy(AddonBytes_Lenght, 0, BufferData, LastIndex, AddonBytes_Lenght.Length);
//LastIndex += AddonBytes_Lenght.Length;
////CMDID
//Buffer.BlockCopy(AddonBytes_CmdID, 0, BufferData, LastIndex, AddonBytes_CmdID.Length);
//LastIndex += AddonBytes_CmdID.Length;
////Error
//Buffer.BlockCopy(AddonBytes_Error, 0, BufferData, LastIndex, AddonBytes_Error.Length);
//LastIndex += AddonBytes_Error.Length;
////DATA
//Buffer.BlockCopy(AddonBytes_Data, 0, BufferData, LastIndex, AddonBytes_Data.Length);
//LastIndex += AddonBytes_Data.Length;
//用Buffer.BlockCopy拷贝 //用Buffer.BlockCopy拷贝
//包长度 //包长度
int AllLenght = 4 + 2 + 2 + AddonBytes_Data.Length; int AllLenght = 4 + 2 + 2 + AddonBytes_Data.Length;

View File

@ -7,8 +7,8 @@
<ProjectGuid>{036F9BD9-308C-4194-AB40-C5952EF0E9F5}</ProjectGuid> <ProjectGuid>{036F9BD9-308C-4194-AB40-C5952EF0E9F5}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>HaoYueNet.ServerNetworkNet4X</RootNamespace> <RootNamespace>HaoYueNet.ServerNetworkNet4x</RootNamespace>
<AssemblyName>HaoYueNet.ServerNetworkNet4X</AssemblyName> <AssemblyName>HaoYueNet.ServerNetworkNet4x</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>

View File

@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下 // 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改 // 控制。更改这些特性值可修改
// 与程序集关联的信息。 // 与程序集关联的信息。
[assembly: AssemblyTitle("HaoYueNet.ServerNetworkNet4xNet4X")] [assembly: AssemblyTitle("HaoYueNet.ServerNetworkNet4xNet4x")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HaoYueNet.ServerNetworkNet4xNet4X")] [assembly: AssemblyProduct("HaoYueNet.ServerNetworkNet4xNet4x")]
[assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]