I use SignalR to send commands from the client to the server without refreshing the page. When a client enters some of my web pages, I start a new connection to the hub. Like this:
var hub = $.connection.siteControllerHub;
$.connection.hub.start();
This "start ()" function takes some time (+ -5 seconds). it means the page is already completed, and the user starts using my interface. SingalR cannot serve the user until he has finished loading the connection.
I know that I can use the asynchronous approach with the done () register:
$.connection.siteControllerHub.start().done(function () {
});
But for me this is not suitable, because if I use this, I need to disable the interface until this event occurs. And this is not cool at all.
I prefer the page loading to take longer, but when it is done, everything will be ready to use.
? ?
.