Click or drag to resize

TelegramFormatSelectorSelectInboundTelegramFormats Method

Selects the appropriate pairs of TelegramFormat and corresponding telegram data, or null.

Namespace:  Demo3D.HLE.Comms.Telegram
Assembly:  Demo3D.HLE (in Demo3D.HLE.dll) Version: 15.0.2.11458
Syntax
C#
public virtual IEnumerable<(TelegramFormat Format, BufferSegment Telegram)>? SelectInboundTelegramFormats(
	IEnumerable<TelegramFormat> formats,
	BufferSegment telegram
)

Parameters

formats
Type: System.Collections.GenericIEnumerableTelegramFormat
Formats to select from.
telegram
Type: Demo3D.IOBufferSegment
Received telegram data, which may contain multiple or incomplete telegrams.

Return Value

Type: IEnumerableValueTupleTelegramFormat, BufferSegment
List of tuples, each containing the selected format and its corresponding telegram data, or null.
Remarks

This method returns a list of tuples, each containing the selected format and its corresponding telegram data extracted from the received data.

The default implementation of this method just returns null, which defers selection back to the default implementation of SelectInboundTelegramFormat(IEnumerableTelegramFormat, BufferSegment). This method should only be extended when the received telegram data is expected to contain multiple or incomplete telegrams, usually as a result of the underlying transport protocol being stream-based (e.g. TCP).

See Also