MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / IRelayClient

Interface IRelayClient

UnityBridge/Editor/IRelayClient.cs:12–88  ·  view source on GitHub ↗

Abstraction for relay client communication. Enables dependency injection and testability for BridgeManager.

Source from the content-addressed store, hash-verified

10 /// Enables dependency injection and testability for BridgeManager.
11 /// </summary>
12 public interface IRelayClient : IDisposable, IAsyncDisposable
13 {
14 /// <summary>
15 /// Instance ID (project path)
16 /// </summary>
17 string InstanceId { get; }
18
19 /// <summary>
20 /// Whether the client is currently connected
21 /// </summary>
22 bool IsConnected { get; }
23
24 /// <summary>
25 /// Current connection status
26 /// </summary>
27 ConnectionStatus Status { get; }
28
29 /// <summary>
30 /// Project name
31 /// </summary>
32 string ProjectName { get; }
33
34 /// <summary>
35 /// Unity version
36 /// </summary>
37 string UnityVersion { get; }
38
39 /// <summary>
40 /// Supported capabilities
41 /// </summary>
42 string[] Capabilities { get; set; }
43
44 /// <summary>
45 /// Event fired when connection status changes
46 /// </summary>
47 event EventHandler<ConnectionStatusChangedEventArgs> StatusChanged;
48
49 /// <summary>
50 /// Event fired when a command is received from the relay server
51 /// </summary>
52 event EventHandler<CommandReceivedEventArgs> CommandReceived;
53
54 /// <summary>
55 /// Connect to the relay server and register this instance
56 /// </summary>
57 Task ConnectAsync(CancellationToken cancellationToken = default);
58
59 /// <summary>
60 /// Disconnect from the relay server
61 /// </summary>
62 Task DisconnectAsync();
63
64 /// <summary>
65 /// Send a STATUS message with optional detail to the relay server
66 /// </summary>
67 Task SendStatusAsync(string status, string detail = null);
68
69 /// <summary>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected