Push Client and Connection

These signatures come directly from PushClient.cs. Except for connection/status methods, subscription calls return a uint request ID and callbacks confirm the final result asynchronously.

Get Push Client Instance

Operation

PushClient.GetInstance. Local client method: it sends no subscription command and produces no request ID or server response envelope.

Request

static PushClient GetInstance()

Parameters

No parameters; returns the process-wide singleton.

Return

Return: PushClient. Returns SingletonInner.INSTANCE; repeated calls return the same reference.

Example

var result = PushClient.GetInstance();

Response type

Local return value; no network response.

Source and related APIs

See Callbacks and the Streaming overview.

Configure Push Client

Operation

PushClient.Config. Local client method: it sends no subscription command and produces no request ID or server response envelope.

Request

PushClient Config(TigerConfig config)

Parameters

config must be non-null; loads the config file, builds authentication, resolves the socket URL, and returns the same PushClient.

Return

Return: PushClient. Returns this and does not connect. Configuration or URL parsing errors may throw synchronously.

Example

var result = client.Config(config);

Response type

Local return value; no network response.

Source and related APIs

See Callbacks and the Streaming overview.

Set Callback Interface

Operation

PushClient.ApiComposeCallback. Local client method: it sends no subscription command and produces no request ID or server response envelope.

Request

PushClient ApiComposeCallback(in IApiComposeCallback apiComposeCallback)

Parameters

Set callback before connecting; stores the reference and returns the same PushClient.

Return

Return: PushClient. Returns this and invokes no callback. A missing callback fails Connect argument validation.

Example

var result = client.ApiComposeCallback(callback);

Response type

Local return value; no network response.

Source and related APIs

See Callbacks and the Streaming overview.

Heartbeat Data

Operation

PushClient.HeartBeatData. Local client method: it sends no subscription command and produces no request ID or server response envelope.

Request

PushClient HeartBeatData(in HeartBeatData heartBeatData)

Parameters

A non-null value replaces heartbeat settings; send and receive intervals clamp to at least 10000 ms; returns the same PushClient.

Return

Return: PushClient. Returns this; a null input preserves current settings.

Example

var result = client.HeartBeatData(new HeartBeatData());

Response type

Local return value; no network response.

Source and related APIs

See Callbacks and the Streaming overview.

Connect

Operation

PushClient.Connect. Socket lifecycle method; it returns no subscription request ID. Configure the client and callback before connecting.

Request

bool Connect()

Parameters

No subscription-subject parameters. ConnectAsync returns an asynchronous Boolean result; Disconnect returns void.

Return

Return: bool. Connect/ConnectAsync return the final IsConnected state. Disconnect sends the disconnect command and releases the channel/event loop; no JSON response is produced.

Example

var result = client.Connect();

Response type

Local connection-state/resource-release result; callbacks report connection events and there is no subscription-response JSON.

Source and related APIs

See Callbacks and the Streaming overview.

ConnectAsync

Operation

PushClient.ConnectAsync. Socket lifecycle method; it returns no subscription request ID. Configure the client and callback before connecting.

Request

Task<bool> ConnectAsync()

Parameters

No subscription-subject parameters. ConnectAsync returns an asynchronous Boolean result; Disconnect returns void.

Return

Return: async task returning bool. Connect/ConnectAsync return the final IsConnected state. Disconnect sends the disconnect command and releases the channel/event loop; no JSON response is produced.

Example

var result = await client.ConnectAsync();

Response type

Local connection-state/resource-release result; callbacks report connection events and there is no subscription-response JSON.

Source and related APIs

See Callbacks and the Streaming overview.

Disconnect

Operation

PushClient.Disconnect. Socket lifecycle method; it returns no subscription request ID. Configure the client and callback before connecting.

Request

void Disconnect()

Parameters

No subscription-subject parameters. ConnectAsync returns an asynchronous Boolean result; Disconnect returns void.

Return

Return: void. Connect/ConnectAsync return the final IsConnected state. Disconnect sends the disconnect command and releases the channel/event loop; no JSON response is produced.

Example

client.Disconnect();

Response type

Local connection-state/resource-release result; callbacks report connection events and there is no subscription-response JSON.

Source and related APIs

See Callbacks and the Streaming overview.

Check Connection Status

Operation

PushClient.IsConnected. Local client method: it sends no subscription command and produces no request ID or server response envelope.

Request

bool IsConnected()

Parameters

No parameters; reads the local channel, authentication countdown, and Active state.

Return

Return: bool. Returns a Boolean and sends no network request.

Example

var result = client.IsConnected();

Response type

Local return value; no network response.

Source and related APIs

See Callbacks and the Streaming overview.

Get Push URL

Operation

PushClient.GetUrl. Local client method: it sends no subscription command and produces no request ID or server response envelope.

Request

string GetUrl()

Parameters

No parameters; reads the URL resolved from Config and stored locally.

Return

Return: string. Returns a string; before Config the URL may not be initialized.

Example

var result = client.GetUrl();

Response type

Local return value; no network response.

Source and related APIs

See Callbacks and the Streaming overview.


Did this page help you?