PacketChangedEventArgs Constructor |
Namespace: Demo3D.Net
public PacketChangedEventArgs( Func<IPacketReader?> peek, Func<IPacketReader?> consume )
The peek function will be used to inspect a message, or pull (peek) more data from a stream into a message in order to inspect it, but it should not consume the message or consume data from the underlying stream (move stream pointers forward).
The consume function should consume the message from the event and consume any header data from the underlying stream. The packet will be Disposed when all the callbacks raised on the DataChanged event return.