您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

31 行
727 B

using System;
using System.Runtime.InteropServices;
namespace Unity.Networking.Transport.Protocols
{
public enum UdpCProtocol
{
ConnectionRequest,
ConnectionReject,
ConnectionAccept,
Disconnect,
Data
}
[StructLayout(LayoutKind.Explicit)]
public unsafe struct UdpCHeader
{
[Flags]
public enum HeaderFlags : byte
{
HasConnectToken = 0x1,
HasPipeline = 0x2
}
public const int Length = 4;
[FieldOffset(0)] public fixed byte Data[Length];
[FieldOffset(0)] public byte Type;
[FieldOffset(1)] public HeaderFlags Flags;
[FieldOffset(2)] public ushort SessionToken;
}
}