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

25 行
876 B

using System.Runtime.InteropServices;
namespace Unity.Networking.Transport.Relay
{
[StructLayout(LayoutKind.Sequential)]
public struct RelayMessageAccepted
{
public const int Length = RelayMessageHeader.Length + RelayAllocationId.k_Length * 2; // Header + FromAllocationId + ToAllocationId
public RelayMessageHeader Header;
public RelayAllocationId FromAllocationId;
public RelayAllocationId ToAllocationId;
public static RelayMessageAccepted Create(RelayAllocationId fromAllocationId, RelayAllocationId toAllocationId, ushort dataLength)
{
return new RelayMessageAccepted
{
Header = RelayMessageHeader.Create(RelayMessageType.Accepted),
FromAllocationId = fromAllocationId,
ToAllocationId = toAllocationId
};
}
}
}