Menu

#7 any way to clone packets?

open
nobody
CCL (2)
5
2007-11-02
2007-11-02
mschwartz
No

Hi,

I noticed that CigiIncomingMsg::ProcessIncomingMsg() uses a jump table of preallocated packets (1 per type) to unpack the message, which are then sent to my signalProcessor one at a time.

I would like to accumulate response packets and hold on to them, so that my host application can retrieve them on demand.

For example, when my client issues a request, it stores it for tracking purposes, then matches responses to requests when the incoming message is received.

Different parts of my program might issue a request. Rather than callback to those areas upon signal processing, I would rather poll to see if I received a response.

Trouble is, there is no way to clone a packet. Why no copy constructors? Have you considered:

CigiBasePacket* CigiBasePacket::clone()???

Thanks,

Mark Schwartz

Discussion