AyCode.Core/AyCode.Services/SignalRs
Loretta 3a9a8fa540 Add EKÁER test creds doc, SignalR connect hook
Expanded EKAER_INTERFACE.md with NAV test credential steps and usage. Refactored AcSignalRClientBase to add OnConnectionEstablished() hook for post-connect logic. Minor log formatting cleanup in AcBinaryHubProtocol.
2026-07-13 18:59:47 +02:00
..
AcBinaryDeserExecutor.cs
AcBinaryHubProtocol.cs Add EKÁER test creds doc, SignalR connect hook 2026-07-13 18:59:47 +02:00
AcBinaryHubProtocolOptions.cs
AcHubConnectionOptions.cs
AcSignalRClientBase.cs Add EKÁER test creds doc, SignalR connect hook 2026-07-13 18:59:47 +02:00
AcSignalRConnectionExtensions.cs
AcSignalRDataSource.cs
AcSignalRProtocolExtensions.cs
AcSignalRTags.cs Ekaer validation tightened, SignalR tags, doc updates 2026-07-10 15:36:58 +02:00
AyCodeBinaryHubProtocol.cs
BinaryProtocolMode.cs
IAcSignalRHubBase.cs
IAcSignalRHubClient.cs
ISignalParams.cs
README.md Ekaer validation tightened, SignalR tags, doc updates 2026-07-10 15:36:58 +02:00
SendToClientType.cs
SignalMessageTagAttribute.cs
SignalRCrudTags.cs
SignalRRequestModel.cs
SignalRSerializationHelper.cs
TrackingItemHelpers.cs

README.md

SignalRs

Custom binary SignalR protocol, client infrastructure, message tagging, and serialization helpers.

Architecture: For full dispatch flow, tag system, and tech debt documentation see AyCode.Services/docs/SIGNALR/README.md. Binary protocol: For wire format, zero-copy pipeline, and three-path read logic see AyCode.Services/docs/SIGNALR_BINARY_PROTOCOL/README.md. Known issues: AyCode.Services/docs/SIGNALR/SIGNALR_ISSUES.md

Key Files

Protocol

  • AcBinaryHubProtocol.cs — Unsealed base IHubProtocol replacing JSON+Base64 with AcBinarySerializer. Handles all 9 SignalR message types. Write: BufferWriterBinaryOutput standalone + AcBinarySerializer.Serialize(value, output) zero-copy to pipe. byte[] fast-path writes tag+VarUInt+bytes via BWO. Read: SequenceReader<byte> from pipe's ReadOnlySequence. Three-path ReadSingleArgument: byte[] fast-path (0x44 tag), IsRawBytesData (raw byte[]), typed deser via SignalDataType. _currentSignalParams captures arg[2] for type-aware arg[3] deserialization.
  • AyCodeBinaryHubProtocol.cs — Derived protocol (currently empty). Exists for registration and future project-specific hooks. Register this instead of AcBinaryHubProtocol.

Client

  • AcSignalRClientBase.cs — Abstract SignalR client managing HubConnection, request/response tracking via pooled SignalRRequestModel. SendCoreAsync builds SignalParams (with IsRawBytesData when T == byte[]). CRUD helpers (Post, Get, GetAll, GetAllInto). Configurable timeouts.
  • IAcSignalRHubClient.cs — Client interface + SignalResponseDataMessage (sealed, RawResponseData is object? — typed object or byte[], GetResponseData<T>() safe is T cast — type-mismatch returns null, does not throw). Legacy message types (IdMessage, SignalPostJsonDataMessage) marked [Obsolete].
  • IAcSignalRHubBase.cs — Base hub interface: OnReceiveMessage(int messageTag, int? requestId, SignalParams signalParams, object data).
  • ISignalParams.csISignalParams base interface + SignalParams (Status, DataSerializerType, Parameters byte[]?, SignalDataType string?, IsRawBytesData bool). Metadata travels as separate hub argument (AcBinary serialized). Parameters and data are independent — both nullable in any direction.

Message Tagging

  • SignalMessageTagAttribute.cs — Three attributes: TagAttribute (base, int messageTag), SignalRAttribute (server method routing + client notification), SignalRSendToClientAttribute (client-side receive).
  • AcSignalRTags.cs — Static constants: None, PingTag, EchoTag; grid-layout roaming tags GetGridLayoutTag / SaveGridLayoutTag / DeleteGridLayoutTag (90010-12) — key-value layout storage contract (key, [layoutJson,] userId), implemented by consumer hubs.
  • SignalRCrudTags.cs — Sealed class bundling 5 independent CRUD tag integers. GetMessageTagByTrackingState() maps TrackingState -> tag. See AyCode.Services/docs/SIGNALR_DATASOURCE/README.md.
  • SendToClientType.cs — Enum: None, Others, Caller, All.

Serialization & Pooling

  • SignalRSerializationHelper.cs — Static helpers: SerializeToBinary(), DeserializeFromBinary(), compressed JSON variants.
  • SignalRRequestModel.cs — Poolable (IResettable) request tracking model with ObjectPool for reuse.