public async ValueTask WriteAsync(ChannelWriter <byte> writer, AUTH_LOGON_PROOF packet) { await writer.WriteAsync((byte)AuthCMD.CMD_AUTH_LOGON_PROOF); await writer.WriteAsync((byte)packet.AccountState); if (packet.M2 != null) { await writer.WriteEnumerableAsync(packet.M2); await writer.WriteZeroNCountAsync(4); } }