the following connects js client existent hubs:
$.connection.hub.start({ transport: 'longpolling' }).done(function () {});
is there way connect particular hub instead?
if not, point of "onconnected()" , "ondisconnected()" being in every hub? if of them going called anyway.
i'm asking because there particular html (something news feed) in want handle notifications 1 hub (when news posted, view should handle , show them appearing). i'm going use groups seems more natural separate in hubs.
you subscribe hubs have client side events associated with. lets had 2 hubs:
- huba
- hubb
in client if have:
var huba = $.connection.huba; huba.client.foo = function() {}; $.connection.hub.start();
you subscribed events on huba (not hubb).
Comments
Post a Comment