TsgcTCPClient › Properties › QueueOptions

QueueOptions Property

Queues outgoing text, binary and ping messages so they are serialised on the connection thread.

Syntax

property QueueOptions: TsgcWSQueueClient_Options read FQueueOptions write SetQueueOptions;

Default Value

Text.Level=qmNone, Binary.Level=qmNone, Ping.Level=qmNone

Remarks

By default messages are written directly on the caller thread. Assigning a queue level (qmLevel0, qmLevel1 or qmLevel2) enqueues them and sends them sequentially from the connection thread, avoiding locks when several threads call WriteData at once. Messages at qmLevel0 are processed before qmLevel1, and qmLevel1 before qmLevel2, so higher-priority categories can be delivered ahead of bulk payloads.

Example


oTCP := TsgcTCPClient.Create(nil);
oTCP.Host := 'www.esegece.com';
oTCP.Port := 2053;
oTCP.QueueOptions.Text.Level := qmLevel2;
oTCP.QueueOptions.Binary.Level := qmLevel2;
oTCP.Active := true;

Back to Properties