Skip to content

Wire Protocol ​

SignalARRR communicates over standard SignalR using a fixed set of hub methods. This page documents the protocol for advanced use cases and custom client implementations.

Hub method names ​

Client → Server ​

Hub methodPurposePayloadReturns
InvokeMessageFire-and-forget (void methods)ClientRequestMessage—
InvokeMessageResultCall with return valueClientRequestMessageobject
SendMessageFire-and-forget (Task methods)ClientRequestMessage—
StreamMessageOpen a server-to-client streamClientRequestMessageIAsyncEnumerable<object>
StreamItemToServerSend a stream itemGuid streamId, object item—
StreamCompleteToServerComplete a streamGuid streamId, string? error—

Server → Client ​

MessagePurposePayload
InvokeServerRequestCall client method, expect reply (native client result)ServerRequestMessage
InvokeServerMessageCall client method, fire-and-forgetServerRequestMessage
ChallengeAuthenticationRequest fresh auth tokenServerRequestMessage
CancelTokenFromServerCancel a client operationServerRequestMessage (with CancellationGuid)

Message types ​

ClientRequestMessage ​

Sent from client to server with every RPC call.

json
{
    "Method": "ChatMethods.SendMessage",
    "Arguments": ["Alice", "Hello!"],
    "Authorization": "Bearer eyJ...",
    "GenericArguments": []
}
FieldTypeRequiredDescription
MethodstringYesClassName.MethodName or InterfaceName|MethodName
ArgumentsarrayYesSerialized method arguments
AuthorizationstringNoBearer token for authenticated methods
GenericArgumentsstring[]NoType names for generic methods

ServerRequestMessage ​

Sent from server to client for bidirectional RPC.

json
{
    "Id": "550e8400-e29b-41d4-a716-446655440000",
    "Method": "GetClientName",
    "Arguments": [],
    "CancellationGuid": null,
    "StreamId": null
}
FieldTypeRequiredDescription
IdGUIDYesCorrelation ID — used internally by SignalR's native client results
MethodstringYesMethod name to invoke on client
ArgumentsarrayNoMethod arguments
GenericArgumentsstring[]NoGeneric type arguments
CancellationGuidGUIDNoLinks to CancelTokenFromServer for remote cancellation
StreamIdGUIDNoStream correlation for client-to-server streams

CancellationTokenReference ​

Marker object placed in Arguments where a CancellationToken parameter exists. The client detects this and substitutes an AbortSignal (TypeScript) or CancellationToken (.NET).

json
{
    "Id": "550e8400-e29b-41d4-a716-446655440001"
}

Protocol flows ​

Client calls server (with result) ​

Server calls client (with result) ​

Token challenge flow ​

Client-to-server streaming ​

Method name resolution ​

The server resolves method names in two formats:

FormatExampleResolution
ClassName.MethodNameChatMethods.SendMessageDirect lookup in method collection
InterfaceName|MethodNameIChatHub|SendMessageInterface-based lookup (used by typed proxies)

Next steps ​

Released under the Apache-2.0 License.