Table of Contents

Class GatewaySignalRClient

Namespace
JD.AI.Gateway.Client
Assembly
JD.AI.Gateway.Client.dll
public sealed class GatewaySignalRClient : IAsyncDisposable
Inheritance
GatewaySignalRClient
Implements
Inherited Members

Constructors

GatewaySignalRClient(string)

public GatewaySignalRClient(string gatewayUrl)

Parameters

gatewayUrl string

Properties

ConnectionError

public string? ConnectionError { get; }

Property Value

string

IsConnected

public bool IsConnected { get; }

Property Value

bool

Methods

ConnectAsync(CancellationToken)

public Task ConnectAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

public ValueTask DisposeAsync()

Returns

ValueTask

A task that represents the asynchronous dispose operation.

StreamChatAsync(string, string, CancellationToken)

Stream chat responses from an agent. Yields chunks as they arrive.

public IAsyncEnumerable<AgentStreamChunk> StreamChatAsync(string agentId, string message, CancellationToken ct = default)

Parameters

agentId string
message string
ct CancellationToken

Returns

IAsyncEnumerable<AgentStreamChunk>

Events

OnActivityEvent

public event EventHandler<ActivityEventArgs>? OnActivityEvent

Event Type

EventHandler<ActivityEventArgs>

OnAgentMessage

public event EventHandler<AgentMessageEventArgs>? OnAgentMessage

Event Type

EventHandler<AgentMessageEventArgs>

OnChannelStatusChanged

public event EventHandler<ChannelStatusEventArgs>? OnChannelStatusChanged

Event Type

EventHandler<ChannelStatusEventArgs>

OnConnected

public event EventHandler? OnConnected

Event Type

EventHandler

OnDisconnected

public event EventHandler? OnDisconnected

Event Type

EventHandler