2024-05-10 15:24:43 +00:00
|
|
|
|
namespace SharpChat {
|
2024-05-20 01:35:39 +00:00
|
|
|
|
public abstract class ServerPacket {
|
2022-08-30 15:00:58 +00:00
|
|
|
|
public long SequenceId { get; }
|
|
|
|
|
|
|
|
|
|
public ServerPacket(long sequenceId = 0) {
|
|
|
|
|
// Allow sequence id to be manually set for potential message repeats
|
2023-02-16 22:56:50 +00:00
|
|
|
|
SequenceId = sequenceId > 0 ? sequenceId : SharpId.Next();
|
2022-08-30 15:00:58 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-05-10 15:24:43 +00:00
|
|
|
|
public abstract string Pack();
|
2022-08-30 15:00:58 +00:00
|
|
|
|
}
|
|
|
|
|
}
|