Reputation: 322
I have a few questions related to SignalR as available in ASP.NET Core. Being relatively new to SignalR, I'm not quite confident regarding these questions:
Context.ConnectionId
remain same if the client has to reconnect to SignalR hub (by reconnect here I mean just recovered from a non active connection and not changing to a new website)?I'm using ASP.NET Core 3.1 and the SignalR server version 3.1.0 shipped with it. For the client side, I'm using 2 kinds of clients: .NET Core SignalR client version 3.0 and Javascript client 3.1.8.
Upvotes: 1
Views: 2003
Reputation: 322
So I've been doing some research myself in the meantime and thought that this post might be helpful to some.
According to this article group rejoining is possible in ASP.NET SignalR. Is the same behavior also available in SignalR shipped with ASP.NET Core?
No, group membership is not preserved when you reconnect in ASP.NET Core SignalR. Check this link.
Does Context.ConnectionId remain same if the client has to reconnect to SignalR hub (by reconnect here I mean just recovered from a non-active connection and not changing to a new website)?
No since the connection looks entirely new to the SignalR server, a new connectionId is generated. This might be because a new negotiate call is instantiated by the client which consequently results in a new connectionId.
Upvotes: 5