Пример #1
0
        public void TestLogoutAck()
        {
            var expected = new LogoutAck().Compile();

            using var ns = PacketTestUtilities.CreateTestNetState();
            ns.SendLogoutAck();

            var result = ns.SendPipe.Reader.TryRead();

            AssertThat.Equal(result.Buffer[0].AsSpan(0), expected);
        }
Пример #2
0
        public void TestLogoutAck()
        {
            var data = new LogoutAck().Compile();

            Span <byte> expectedData = stackalloc byte[2];
            var         pos          = 0;

            expectedData.Write(ref pos, (byte)0xD1); // Packet ID
            expectedData.Write(ref pos, (byte)0x1);  // 1 - Ack

            AssertThat.Equal(data, expectedData);
        }
Пример #3
0
 public static void Handle_LogoutAck(gNetMsg msg)
 {
     LogoutAck ack = gPB.pbDecode <LogoutAck> (msg.content);
     //TO DO
 }