sharp-chat/SharpChat/IServerPacket.cs

12 lines
369 B
C#

namespace SharpChat {
public abstract class ServerPacket {
public long SequenceId { get; }
public ServerPacket(long sequenceId = 0) {
// Allow sequence id to be manually set for potential message repeats
SequenceId = sequenceId > 0 ? sequenceId : SharpId.Next();
}
public abstract string Pack();
}
}