TsgcWSPClient_AMQP1Methods › WriteData

WriteData Method

Low-level method that writes raw bytes straight onto the underlying WebSocket / broker transport, bypassing the AMQP 1.0 codec. Overloaded for string or stream input.

Overloads

Overload 1

Syntax

procedure WriteData(const aText: String);

Parameters

NameTypeDescription
aTextconst StringRaw text pushed onto the transport without any AMQP 1.0 framing.

Remarks

String overload. The text is written as a single WebSocket text frame (or a raw TCP write when using the Broker transport) without passing through the AMQP 1.0 frame codec — no Open/Begin/Attach/Transfer wrapper is added. Intended for diagnostics, testing of malformed frames and advanced integration only; regular messaging should use the link-level methods.

Example

oAMQP1.WriteData('raw diagnostic frame');

Overload 2

Syntax

procedure WriteData(aStream: TStream; aSize: Integer = 0; const aStreaming: TwsStreaming = stmNone);

Parameters

NameTypeDescription
aStreamTStreamStream whose bytes are written directly as one or more binary WebSocket frames. This is the path the internal codec uses to emit Open / Begin / Attach / Transfer / Detach / End / Close frames.
aSizeIntegerNumber of bytes to read from aStream; 0 means the full stream.
aStreamingconst TwsStreamingWebSocket streaming mode used when a large payload must be split across multiple frames (stmNone writes a single frame).

Remarks

Stream overload. Sends the stream content as binary frames without re-encoding it at the AMQP 1.0 layer, so the buffer must already be a valid sequence of framed AMQP 1.0 performatives. This is the primitive the component itself uses internally after encoding a frame; application code normally only needs it for manual injection tests or to forward captured traffic.

Example

oAMQP1.WriteData(vStream, 0, stmNone);

Back to Methods