TsgcWSPClient_Files › Events

TsgcWSPClient_Files Events

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

Lifecycle

NameDescription
OnConnectFires after the WebSocket handshake completes and the Files subprotocol is ready to transfer files.
OnDisconnectFires when the transport connection drops; the subprotocol stops its QoS timer and optionally clears the pending streams.
OnErrorFires for transport-level errors reported by the underlying sgcWebSocket client.
OnExceptionFires when an unhandled exception is raised inside the subprotocol worker or QoS timer thread.

Messaging

NameDescription
OnMessageFires when a plain text message arrives inside a Files subprotocol envelope.
OnBinaryFires when a raw binary frame arrives through the Files subprotocol transport.
OnFragmentedFires for every fragmented WebSocket frame passing through the Files subprotocol transport.
OnRawMessageFires with the untouched incoming text before the subprotocol parses it; set Handled to stop default processing.

Subscriptions

NameDescription
OnSubscriptionFires when the server confirms a channel subscription requested with Subscribe.
OnUnSubscriptionFires when the server confirms that a channel subscription has been cancelled.

Receive

NameDescription
OnFileReceivedAuthorizationFires when a qosLevel2 file is about to be saved, letting you accept or reject it and optionally rename the destination.
OnFileReceivedFires when an incoming file has been fully received and persisted to disk.
OnFileReceivedFragmentFires every time a new fragment of an incoming file has been written to disk; ideal for progress indicators.
OnFileReceivedErrorFires when an error occurs while receiving a file.

Send

NameDescription
OnFileBeforeSentFires just before the file header leaves the client, letting you inspect or tweak the outgoing TsgcWSMessageFile.
OnFileSentFragmentRequestFires each time the client is about to send a new outbound file fragment; ideal for upload progress and cancellation.
OnFileSentAcknowledgmentFires when the server acknowledges processing of an outbound file fragment under qosLevel1 or qosLevel2.
OnFileSentFires when the server confirms that a file has been fully received.
OnFileSentErrorFires when the upload of a file fails either locally or after a rejection from the server.

All Events (alphabetical)

NameDescription
OnBinaryFires when a raw binary frame arrives through the Files subprotocol transport.
OnConnectFires after the WebSocket handshake completes and the Files subprotocol is ready to transfer files.
OnDisconnectFires when the transport connection drops; the subprotocol stops its QoS timer and optionally clears the pending streams.
OnErrorFires for transport-level errors reported by the underlying sgcWebSocket client.
OnExceptionFires when an unhandled exception is raised inside the subprotocol worker or QoS timer thread.
OnFileBeforeSentFires just before the file header leaves the client, letting you inspect or tweak the outgoing TsgcWSMessageFile.
OnFileReceivedFires when an incoming file has been fully received and persisted to disk.
OnFileReceivedAuthorizationFires when a qosLevel2 file is about to be saved, letting you accept or reject it and optionally rename the destination.
OnFileReceivedErrorFires when an error occurs while receiving a file.
OnFileReceivedFragmentFires every time a new fragment of an incoming file has been written to disk; ideal for progress indicators.
OnFileSentFires when the server confirms that a file has been fully received.
OnFileSentAcknowledgmentFires when the server acknowledges processing of an outbound file fragment under qosLevel1 or qosLevel2.
OnFileSentErrorFires when the upload of a file fails either locally or after a rejection from the server.
OnFileSentFragmentRequestFires each time the client is about to send a new outbound file fragment; ideal for upload progress and cancellation.
OnFragmentedFires for every fragmented WebSocket frame passing through the Files subprotocol transport.
OnMessageFires when a plain text message arrives inside a Files subprotocol envelope.
OnRawMessageFires with the untouched incoming text before the subprotocol parses it; set Handled to stop default processing.
OnSubscriptionFires when the server confirms a channel subscription requested with Subscribe.
OnUnSubscriptionFires when the server confirms that a channel subscription has been cancelled.