mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-04-09 13:00:39 +08:00
26 lines
1.3 KiB
C#
26 lines
1.3 KiB
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace BetterGenshinImpact.Hutao;
|
|
|
|
// Layout:
|
|
// 0 1 2 3 4 Bytes
|
|
// ┌─────────┬──────┬─────────┬─────────────┐
|
|
// │ Version │ Type │ Command │ ContentType │
|
|
// ├─────────┴──────┴─────────┴─────────────┤ 4 Bytes
|
|
// │ ContentLength │
|
|
// ├────────────────────────────────────────┤ 8 Bytes
|
|
// │ │
|
|
// │─────────────── Checksum ───────────────│
|
|
// │ │
|
|
// └────────────────────────────────────────┘ 16 Bytes
|
|
// Any content will be placed after the header.
|
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
|
internal struct PipePacketHeader
|
|
{
|
|
public byte Version;
|
|
public PipePacketType Type;
|
|
public PipePacketCommand Command;
|
|
public PipePacketContentType ContentType;
|
|
public int ContentLength;
|
|
public ulong Checksum;
|
|
} |