Skip to content

da414572 7701 3680 6aa5 1aaecaf0eb78

Axel Kesseler edited this page Mar 1, 2023 · 1 revision

IUdpChunkHelper.GetChunks Method

Splits the payload into chunks according to current settings.

Namespace: Plexdata.LogWriter.Internals.Abstraction
Assembly: Plexdata.LogWriter.Network (in Plexdata.LogWriter.Network.dll) Version: 1.0.7.1

Syntax

C#

IEnumerable<byte[]> GetChunks(
	byte[] payload
)

Parameters

 

payload
Type: System.Byte[]
The payload to split into chunks.

Return Value

Type: IEnumerable(Byte[])
A list of payload chunks according to current settings.

Remarks

This method splits provided payload into chunks according to current settings. But attention, this method is primarily intended to create GELF chunks!

In case of GELF messages (see LogType and Gelf), this method splits provided payload into GELF compliant pieces. Furthermore, the settings Compressed, Threshold and Maximum are taken into account. For more information about GELF chunks please see https://go2docs.graylog.org/5-0/getting_in_log_data/gelf.html.

In case of non-GELF messages (LogType), this method simply splits the payload into pieces and uses the Maximum as chunk size limitation. Attention! No chunk labelling (or something similar to identify chunks in any way) is applied, which makes it almost impossible to reassemble a chunked message. Therefore, is is not recommended to split payloads without GELF type!

See Also

Reference

IUdpChunkHelper Interface
Plexdata.LogWriter.Internals.Abstraction Namespace

Clone this wiki locally