Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public static void Handle_LogoutAck(gNetMsg msg)
 {
     LogoutAck ack = gPB.pbDecode <LogoutAck> (msg.content);
     //TO DO
 }