public BBMessageHeader(BaseBulletinBoard board, BulletinMessage msg) : base(0x71)
{
var poster = SafeString(msg.PostedName);
var subject = SafeString(msg.Subject);
var time = SafeString(msg.GetTimeAsString());
EnsureCapacity(22 + poster.Length + subject.Length + time.Length);
Stream.Write((byte)0x01); // PacketID
Stream.Write(board.Serial); // Bulletin board serial
Stream.Write(msg.Serial); // Message serial
var thread = msg.Thread;
if (thread == null)
{
Stream.Write(0); // Thread serial--root
}
else
{
Stream.Write(thread.Serial); // Thread serial--parent
}
WriteString(poster);
WriteString(subject);
WriteString(time);
}