TsgcWSPClient_Dataset › Events

TsgcWSPClient_Dataset Events

Events you can handle, grouped by purpose, followed by the full alphabetical list.

Lifecycle

NameDescription
OnConnectFires after the WebSocket handshake completes and the Dataset subprotocol is initialized.
OnDisconnectFires when the connection is closed, reporting the close code.
OnErrorFires when the server or transport reports an error string.
OnExceptionFires when an unhandled exception occurs on the connection.
OnSessionFires after a successful connection or GetSession request with the assigned session Guid.

Messaging

NameDescription
OnMessageFires when a plain text message arrives on the sgc channel.
OnBinaryFires when a binary frame arrives; payload is delivered as a TMemoryStream.
OnFragmentedFires for fragmented WebSocket frames, exposing OpCode and continuation flag.
OnRawMessageFires before the component parses a message; set Handled to True to suppress default processing.

PubSub

NameDescription
OnSubscriptionFires when the client has been subscribed to a channel.
OnUnSubscriptionFires when the client has been unsubscribed from a channel.
OnEventFires when a message is received on a subscribed channel.
OnAcknowledgmentFires when the server acknowledges receipt of a QoS 1 or 2 message.

Dataset

NameDescription
OnBeforeNewRecordFires before a new record received from the server is inserted in the local Dataset.
OnAfterNewRecordFires after a new record received from the server has been inserted in the local Dataset.
OnBeforeUpdateRecordFires before an update received from the server is applied to the local Dataset.
OnAfterUpdateRecordFires after an update received from the server has been applied to the local Dataset.
OnBeforeDeleteRecordFires before a delete received from the server is applied to the local Dataset.
OnAfterDeleteRecordFires after a delete received from the server has been applied to the local Dataset.
OnBeforeDatasetUpdateFires before any Dataset message from the server is applied locally; set Handled to skip it.
OnBeforeSynchronizeFires when the server announces the start of a Synchronize batch.
OnAfterSynchronizeFires when the server signals that the Synchronize batch has ended.
OnMetaDataFires when the server answers a GetMetaData request with the Dataset field definitions.

RPC

NameDescription
OnRPCResultFires when the server returns a successful RPC response.
OnRPCErrorFires when the server returns an error response to an RPC request.

All Events (alphabetical)

NameDescription
OnAcknowledgmentFires when the server acknowledges receipt of a QoS 1 or 2 message.
OnAfterDeleteRecordFires after a delete received from the server has been applied to the local Dataset.
OnAfterNewRecordFires after a new record received from the server has been inserted in the local Dataset.
OnAfterSynchronizeFires when the server signals that the Synchronize batch has ended.
OnAfterUpdateRecordFires after an update received from the server has been applied to the local Dataset.
OnBeforeDatasetUpdateFires before any Dataset message from the server is applied locally; set Handled to skip it.
OnBeforeDeleteRecordFires before a delete received from the server is applied to the local Dataset.
OnBeforeNewRecordFires before a new record received from the server is inserted in the local Dataset.
OnBeforeSynchronizeFires when the server announces the start of a Synchronize batch.
OnBeforeUpdateRecordFires before an update received from the server is applied to the local Dataset.
OnBinaryFires when a binary frame arrives; payload is delivered as a TMemoryStream.
OnConnectFires after the WebSocket handshake completes and the Dataset subprotocol is initialized.
OnDisconnectFires when the connection is closed, reporting the close code.
OnErrorFires when the server or transport reports an error string.
OnEventFires when a message is received on a subscribed channel.
OnExceptionFires when an unhandled exception occurs on the connection.
OnFragmentedFires for fragmented WebSocket frames, exposing OpCode and continuation flag.
OnMessageFires when a plain text message arrives on the sgc channel.
OnMetaDataFires when the server answers a GetMetaData request with the Dataset field definitions.
OnRawMessageFires before the component parses a message; set Handled to True to suppress default processing.
OnRPCErrorFires when the server returns an error response to an RPC request.
OnRPCResultFires when the server returns a successful RPC response.
OnSessionFires after a successful connection or GetSession request with the assigned session Guid.
OnSubscriptionFires when the client has been subscribed to a channel.
OnUnSubscriptionFires when the client has been unsubscribed from a channel.