44 lines
877 B
C#
44 lines
877 B
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Runtime.InteropServices;
|
|||
|
|
using System.Text;
|
|||
|
|
|
|||
|
|
namespace RCUHost.Protocols
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// 搜索主机 Packet 服务器 -> RCU
|
|||
|
|
/// </summary>
|
|||
|
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
|||
|
|
public struct SearchHostPacket
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// 用户码
|
|||
|
|
/// 用于多用户搜索时区别搜索指令是由哪个用户发出的
|
|||
|
|
/// </summary>
|
|||
|
|
public int UserCode;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// RCU是否保存服务器IP和端口,0/不保存,1/保存
|
|||
|
|
/// </summary>
|
|||
|
|
public byte IsSave;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 服务器IP
|
|||
|
|
/// </summary>
|
|||
|
|
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4)]
|
|||
|
|
public byte[] IP;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 服务器端口号
|
|||
|
|
/// </summary>
|
|||
|
|
public ushort Port;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// CRC16
|
|||
|
|
/// </summary>
|
|||
|
|
public ushort CRC;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|