64 void *
operator new(
size_t nSize) {
65 return PoolMemAlloc(
static_cast<int>(nSize),
"TimeRequestPkt", 0);
73 void operator delete(
void *pBlock) {
101 return "TimeRequestPkt";
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
InternalPacket(unsigned char nFlags=0, int nReceiver=kUnset)
Construct a packet from an unset sender.
Definition internalpacket.h:33
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
Text output stream.
Definition prnstream.h:16
TimeRequestPkt()=default
Construct a packet with mSendTime left unset.
float GetSendTime() const
Definition timerequestpkt.h:132
void restoreGuts(BinStream &stream) override
Read the time of the request.
Message * Clone() override
Produce a heap copy of this packet.
Definition timerequestpkt.h:82
const char * GetName() const override
Report this packet's class name.
Definition timerequestpkt.h:100
~TimeRequestPkt() override=default
Destroy the object.
void saveGuts(BinStream &stream) const override
Write the time of the request.
static Message * New()
Produce a default-constructed packet on the heap.
TimeRequestPkt(int nReceiver, float fSendTime)
Construct a packet for one peer, with no delivery flag.
Definition timerequestpkt.h:45
void PrintExtra(PrnStream &stream) const override
Write the sender, the receiver, and the time of the request.
int Type() override
Report this packet's registered identity.
Definition timerequestpkt.h:91
void * PoolMemAlloc(int nSize, const char *pszTag, int nAlign)
Allocate a block from the pool heaps and bill it to a tag.
void PoolMemFree(void *pBlock)
Return a block PoolMemAlloc() handed out to the pool heap that owns it.
int g_nTimeRequestPktType
Identity that TimeRequestPkt::Type() reports.