SignalR/SignalR — Issue #235: Disconnected doesn't cause server invocation to fail?
Author: Zyphrax
Created: 2012-03-08 07:53:58+00:00
State: open

First of all, great work on this library!

I'm writing an application and would like to use SignalR to communicate data back-and-forth between the client and server. In order to succesfully sync the data changes from my client to my server, I have to keep track of which messages were processed by the server.

My application will also be available offline, so I can't assume that the server is always available. I expected the fail callback to be called when the server is disconnected. Unfortunately this doesn't seem to work.

myHub.sendData()
.done(function () { console.log('DONE'); })
.fail(function () { console.log('FAIL'); });

What is the proper way to do this?
I'm using a Hub.

Few suggestions to the project:
- Could add more information to the API documentation in the wiki?
Not all callbacks (e.g. reconnected, disconnected) are described.
- It would be great to be able to set the JSON.Net serializer NullValueHandling to ignore (saves bandwidth)
- The /s/signalr/hubs script should be minified, and perhaps smaller? (move some code to jquery.signalr?)
Or maybe remove it all together and make it part of the handshake?

Thanks!