1
0
mirror of https://github.com/oliverbooth/TcpDotNet synced 2024-11-09 16:15:42 +00:00
TcpDotNet/TcpDotNet.ListenerIntegrationTest/GoodbyePacket.cs

22 lines
480 B
C#
Raw Normal View History

2022-07-05 14:55:59 +01:00
using TcpDotNet.Protocol;
namespace TcpDotNet.ListenerIntegrationTest;
[Packet(0x02)]
internal sealed class GoodbyePacket : Packet
{
public string Message { get; set; }
protected override Task DeserializeAsync(ProtocolReader reader)
{
Message = reader.ReadString();
return Task.CompletedTask;
}
protected override Task SerializeAsync(ProtocolWriter writer)
{
writer.Write(Message);
return Task.CompletedTask;
}
}