TsgcWSPClient_AMQP1Methods › Close

Close Method

Sends the AMQP 1.0 Close frame to the peer, ending the connection at the container level.

Syntax

procedure Close(const aOptions: TsgcAMQP1MethodOptions_Close = nil);

Parameters

NameTypeDescription
aOptionsconst TsgcAMQP1MethodOptions_CloseOptional options record carrying the error condition, description and info map attached to the Close frame. Pass nil for a clean close without error.

Remarks

Writes an AMQP 1.0 close performative on channel 0 to end the connection. The peer normally mirrors the frame, at which point OnAMQPClose fires with the returned error (or nil for a clean close) and the underlying WebSocket/TCP connection is then torn down. This is the orderly way to shut down: any sessions and links still attached are detached first. If aOptions.Error is filled the supplied condition, description and info are sent back to the broker to report why the client is closing.

Example

oAMQP1.Close;

Back to Methods