Friday, 7 June 2019

Configuring SignalR

Each host has access to an IConfigurationManager which allows you to tweak some default SignalR settings. Some things that can be tweaked are:

  •     ConnectionTimeout - Represents the amount of time to leave a connection open before timing out. Default is 110 seconds.
  •     DisconnectTimeout - Represents the amount of time to wait after a connection goes away before raising the disconnect event. Default is 30 seconds.
  •     KeepAlive - Representing the amount of time to wait before sending a keep alive packet over an idle connection. Set to null to disable keep alive. This is set to 30 seconds by default. When this is on, the ConnectionTimeout will have no effect.