TsgcWSPClient_AMQP1 › Methods › Close
Sends the AMQP 1.0 Close frame to the peer, ending the connection at the container level.
procedure Close(const aOptions: TsgcAMQP1MethodOptions_Close = nil);
| Name | Type | Description |
|---|---|---|
aOptions | const TsgcAMQP1MethodOptions_Close | Optional options record carrying the error condition, description and info map attached to the Close frame. Pass nil for a clean close without error. |
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.
oAMQP1.Close;