From 0812f8e3d96726d56c01b16724b1b1d104c4d49b Mon Sep 17 00:00:00 2001 From: Loretta Date: Mon, 13 Jul 2026 08:38:12 +0200 Subject: [PATCH] Update SignalR protocol and hub registration docs Clarified that both JSON and AcBinary protocols are registered for SignalR, allowing client-side selection. Updated keep-alive and timeout settings to use constants with new values. Expanded documentation on protocol registration and startup logging. Improved hub registration details, including endpoints, protocol usage, and logging for LoggerSignalRHub. --- Nop.Plugin.Misc.AIPlugin/docs/SIGNALR/README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Nop.Plugin.Misc.AIPlugin/docs/SIGNALR/README.md b/Nop.Plugin.Misc.AIPlugin/docs/SIGNALR/README.md index 7e6b4e4..813016d 100644 --- a/Nop.Plugin.Misc.AIPlugin/docs/SIGNALR/README.md +++ b/Nop.Plugin.Misc.AIPlugin/docs/SIGNALR/README.md @@ -12,16 +12,18 @@ Configured in `PluginNopStartup`: | Setting | Value | |---|---| -| KeepAliveInterval | 30 seconds | -| ClientTimeoutInterval | 30 seconds | +| KeepAliveInterval | `FruitBankConstClient.SignalRKeepAliveIntervalSecond` = 60 s | +| ClientTimeoutInterval | `FruitBankConstClient.SignarlRTimeoutIntervalSecond` = 180 s | | MaximumReceiveMessageSize | 30 MB | | EnableDetailedErrors | true | | StatefulReconnectBufferSize | 30 MB | -| **HubProtocol** | **`AcBinaryHubProtocol`** (singleton `IHubProtocol`) | +| **Hub protocols** | **`json` (default) + `acbinary`** — a kliens a handshake-ben választ | -**Wire protocol:** `AcBinaryHubProtocol` (`AyCode.Services.SignalRs`, from `AyCode.Services.dll`) — custom binary `IHubProtocol` using `AcBinarySerializer`. Eliminates JSON+Base64 overhead. Requires `TransferFormat.Binary` → WebSocket transport only. Protocol name: `"acbinary"`. Registered as `services.AddSingleton(new AcBinaryHubProtocol())` after `AddSignalR()`. +**Wire protocol:** `AcBinaryHubProtocol` (`AyCode.Services.SignalRs`) — custom binary `IHubProtocol` using `AcBinarySerializer`. Eliminates JSON+Base64 overhead. Protocol name: `"acbinary"`. Registered via `.AddSignalR(...).AddAcBinaryProtocol(opts => { ProtocolMode=Bytes; FlushPolicy=Coalesced; Logger=new Logger(nameof(AyCodeBinaryHubProtocol)); })` — a default **JSON MELLÉ** kerül (nem cseréli); a `#if DEBUG` startup-dump (`>>> HubProtocol: …`) kiírja a ténylegesen regisztrált protokollokat. -Hubs registered: `DevAdminSignalRHub`, `LoggerSignalRHub` (from AyCode.Core.Server). +Hubs registered (mindkettő WebSockets-only endpoint): +- `DevAdminSignalRHub` (`/fbHub`) — fő adat-hub, acbinary protokollon. +- `LoggerSignalRHub` (`/loggerHub`, `FruitBank.Common.Server`; base: `AcLoggerSignalRHub` az `AyCode.Services.Server`-ből) — kliens-log feltöltés fogadása, wire-típus: `LogItemClient` (2026-07 óta acbinary protokollon; korábban JSON). Kapcsolat-életciklust logol (`Logger client connected/disconnected`), így a halott feltöltő-csatorna a konzolból látszik. ## FruitBankHub