What's the difference between version 1.2 and 1.3 of the SignalR protocol? I've checked the release notes and the github repo but can't figure out what is changed.
SignalR. Client NuGet package contains the . NET client libraries for ASP.NET Core SignalR. Use the HubConnectionBuilder to create and build an instance of a connection to a hub.
SignalR handles connection management automatically, and lets you broadcast messages to all connected clients simultaneously, like a chat room. You can also send messages to specific clients.
The big change is when clients decide they are "connected". In the 1.3 protocol, an initialization message is sent back to the client and only then do clients consider themselves connected. Relevant code:
https://github.com/SignalR/SignalR/blob/dev/src/Microsoft.AspNet.SignalR.Client/Transports/TransportHelper.cs#L244
This may be an incomplete list of changes I noticed when the client uses longPolling:
On the negotiate GET request, the client protocol and connection data are added as GET params to the URL:
In the negotiate JSON repsonse, the clientProtocol is now 1.3 instead of 1.2.
On the send POST request for longPolling, the connectionData (names of hubs) is added to the URL.
On longPoll responses from the server, as dfowler mentions, an "S" was added that initializes the connection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With