Update: SignalR AddToGroups at Query String

Use OnConnection query string to add group membership rather than making
an additional call after connection.
This commit is contained in:
Gary Sharp
2013-07-04 15:28:53 +10:00
parent 070681888e
commit b1d16ae87c
15 changed files with 137 additions and 114 deletions
+1 -2
View File
@@ -246,10 +246,9 @@
});
}
function updateWithLive() {
liveConnection = $.connection('@(Url.Content("~/API/Logging/TaskStatusNotifications"))');
liveConnection = $.connection('@(Url.Content("~/API/Logging/TaskStatusNotifications"))', {addToGroups: sessionId});
liveConnection.received(update_Received);
liveConnection.start(function () {
liveConnection.send('/addToGroups:' + sessionId);
updateWithAjax();
});
}
+1 -2
View File
@@ -296,10 +296,9 @@ WriteLiteral("\';\r\n\r\n // Clear Menu\r\n $(\'#menu\').empty();\
#line default
#line hidden
WriteLiteral(@"');
WriteLiteral(@"', {addToGroups: sessionId});
liveConnection.received(update_Received);
liveConnection.start(function () {
liveConnection.send('/addToGroups:' + sessionId);
updateWithAjax();
});
}