Click or drag to resize

PacketChangedEventArgs Constructor

Creates PacketChangedEventArgs.

Namespace:  Demo3D.Net
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 15.0.2.11458
Syntax
C#
public PacketChangedEventArgs(
	Func<IPacketReader?> peek,
	Func<IPacketReader?> consume
)

Parameters

peek
Type: SystemFuncIPacketReader
A function for peeking at the packet.
consume
Type: SystemFuncIPacketReader
A method for consuming the packet, ensuring it's returned only once.
Remarks

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.

See Also