question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing ITransportHeartbeat for SignalR Core

See original GitHub issue

Hi folks!

First issue here, tried to put it in the right place but not quite sure. Apologize if I done it wrong!

So, we were looking into monitoring signalR alive connections and found out a legacy code of ours where there was a ITransportHeartbeat in signalR for .net framework that was pretty useful for checking hearbeats.

Is there anything like that in signalR for .net core? Or any approach recommended to check connection heartbeats?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
analogrelaycommented, Feb 3, 2020

There isn’t a global hook for all connections, but you can hook the heartbeat for each connection with (pseudo-)code like this in your Hub’s OnConnectedAsync:

var heartbeat = Context.Features.Get<IConnectionHeartbeatFeature>();
heartbeat.OnHeartBeat(MyAction, /* a state object that will be passed to MyAction, can be null */);
1reaction
mviegascommented, Feb 4, 2020

Thanks @anurse. I’ll go give it a try later on and come back with some feedback!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add SignalR's ITransportHeartbeat to Autofac
I'm trying to use Autofac to have one instance of the ITransportHeartbeat interface for my ASP.NET MVC 5 app to track all connected...
Read more >
SignalR Troubleshooting
This article describes some common issues with developing SignalR applications. ... NET Core SignalR. ... Missing JSON parser on the client.
Read more >
ASP.NET Core SignalR .NET Client
In this article. Install the SignalR .NET client package; Connect to a hub; Handle lost connection; Call hub methods from client ...
Read more >
NET CORE SignalR. SignalR Core is a new library comes…
ITransportHeartbeat , it has collection of existing connections, so we can remove stuck data with iteration. I won't delve into details.However, taking all ......
Read more >
SignalR Core: Heartbeat and Redis - Alim Özdemir
ITransportHeartbeat , it has collection of existing connections, so we can remove stuck data with iteration. I won't delve into details here, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found