Table of Contents

Interface ICallback

Namespace
PushTechnology.ClientInterface.Client.Callbacks
Assembly
Diffusion.Client.dll

The callback interface that provides responses from the server.

public interface ICallback

Remarks

Direct extensions of this interface support a single callback each time the callback is used in a call (the call context). If the call fails to return a result, for example if the session is closed or the operation times out, OnError(ErrorReason) will be called. Each call to the server will result in invocation of either a single callback method or OnError(ErrorReason).

The IStream extension supports multiple responses for each call.

If the server returns a response for an unknown call context (typically a late response for a call context has timed out), an error will be reported to the ErrorNotified handler.

Since 5.1

Methods

OnError(ErrorReason)

Notification of a contextual error related to this callback.

void OnError(ErrorReason errorReason)

Parameters

errorReason ErrorReason

The reason for the error.

Remarks

This is analogous to an exception being raised. Situations in which this method is called include the session being closed, a communication timeout, or a problem with the provided parameters. No further calls will be made to this callback for the call context.