Update: SignalR 2.1

https://github.com/SignalR/SignalR/releases/tag/2.1.0
This commit is contained in:
Gary Sharp committed 2014-06-19 16:02:42 +10:00
1 parent 045fb0b65d
commit a3a92245ae
12 files changed
+547 -294

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AspNet.SignalR.Utils" version="2.0.3" />
<package id="Microsoft.AspNet.SignalR.Utils" version="2.1.0" />
</packages>
+4 -3
View File
@@ -42,8 +42,9 @@
<Reference Include="LumenWorks.Framework.IO">
<HintPath>..\packages\LumenWorks.Framework.IO.3.8.0\lib\net20\LumenWorks.Framework.IO.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.SignalR.Core">
<HintPath>..\packages\Microsoft.AspNet.SignalR.Core.2.0.3\lib\net45\Microsoft.AspNet.SignalR.Core.dll</HintPath>
<Reference Include="Microsoft.AspNet.SignalR.Core, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.SignalR.Core.2.1.0\lib\net45\Microsoft.AspNet.SignalR.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin">
<HintPath>..\packages\Microsoft.Owin.2.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
@@ -361,7 +362,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_StartDate="2011/7/1" BuildVersion_BuildAction="Both" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" />
<UserProperties BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2011/7/1" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
</VisualStudio>
</ProjectExtensions>
<PropertyGroup>
+1 -1
View File
@@ -4,7 +4,7 @@
<package id="LumenWorks.Framework.IO" version="3.8.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="4.0.30506.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="2.0.30506.0" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.Core" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.Core" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="2.0.30506.0" targetFramework="net45" />
<package id="Microsoft.Owin" version="2.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security" version="2.0.1" targetFramework="net45" />
@@ -1,8 +1,8 @@
///#source 1 1 /ClientSource/Scripts/Modules/jQuery-SignalR/jquery.signalR-2.0.3.js
///#source 1 1 /ClientSource/Scripts/Modules/jQuery-SignalR/jquery.signalR-2.1.0.js
/* jquery.signalR.core.js */
/*global window:false */
/*!
* ASP.NET SignalR JavaScript Library v2.0.3
* ASP.NET SignalR JavaScript Library v2.1.0
* http://signalr.net/
*
* Copyright (C) Microsoft Corporation. All rights reserved.
@@ -12,7 +12,6 @@
/// <reference path="Scripts/jquery-1.6.4.js" />
/// <reference path="jquery.signalR.version.js" />
(function ($, window, undefined) {
"use strict";
var resources = {
nojQuery: "jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.",
@@ -21,6 +20,10 @@
stoppedWhileLoading: "The connection was stopped during page load.",
stoppedWhileNegotiating: "The connection was stopped during the negotiate request.",
errorParsingNegotiateResponse: "Error parsing negotiate response.",
errorDuringStartRequest: "Error during start request. Stopping the connection.",
stoppedDuringStartRequest: "The connection was stopped during the start request.",
errorParsingStartResponse: "Error parsing start response: '{0}'. Stopping the connection.",
invalidStartResponse: "Invalid start response: '{0}'. Stopping the connection.",
protocolIncompatible: "You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.",
sendFailed: "Send failed.",
parseFailed: "Failed at parsing response: {0}",
@@ -33,7 +36,9 @@
pingServerFailedStatusCode: "Failed to ping server. Server responded with status code {0}, stopping the connection.",
pingServerFailedParse: "Failed to parse ping server response, stopping the connection.",
noConnectionTransport: "Connection is in an invalid state, there is no transport active.",
webSocketsInvalidState: "The Web Socket transport is in an invalid state, transitioning into reconnecting."
webSocketsInvalidState: "The Web Socket transport is in an invalid state, transitioning into reconnecting.",
reconnectTimeout: "Couldn't reconnect within the configured timeout of {0} ms, disconnecting.",
reconnectWindowTimeout: "The client has been inactive since {0} and it has exceeded the inactivity timeout of {1} ms. Stopping the connection."
};
if (typeof ($) !== "function") {
@@ -95,6 +100,11 @@
return connection.state === signalR.connectionState.disconnected;
},
supportsKeepAlive = function (connection) {
return connection._.keepAliveData.activated &&
connection.transport.supportsKeepAlive(connection);
},
configureStopReconnectingTimeout = function (connection) {
var stopReconnectingTimeout,
onReconnectTimeout;
@@ -103,7 +113,9 @@
// Without this check if a connection is stopped then started events will be bound multiple times.
if (!connection._.configuredStopReconnectingTimeout) {
onReconnectTimeout = function (connection) {
connection.log("Couldn't reconnect within the configured timeout (" + connection.disconnectTimeout + "ms), disconnecting.");
var message = signalR._.format(signalR.resources.reconnectTimeout, connection.disconnectTimeout);
connection.log(message);
$(connection).triggerHandler(events.onError, [signalR._.error(message, /* source */ "TimeoutException")]);
connection.stop(/* async */ false, /* notifyServer */ false);
};
@@ -323,6 +335,7 @@
this.url = url;
this.qs = qs;
this.lastError = null;
this._ = {
keepAliveData: {},
connectingMessageBuffer: new ConnectingMessageBuffer(this, function (message) {
@@ -352,6 +365,8 @@
}
},
_originalJson: window.JSON,
json: window.JSON,
isCrossDomain: function (url, against) {
@@ -387,7 +402,7 @@
state: signalR.connectionState.disconnected,
clientProtocol: "1.3",
clientProtocol: "1.4",
reconnectDelay: 2000,
@@ -414,6 +429,8 @@
deferred = connection._deferral || $.Deferred(), // Check to see if there is a pre-existing deferral that's being built on, if so we want to keep using it
parser = window.document.createElement("a");
connection.lastError = null;
// Persist the deferral so that if start is called multiple times the same deferral is used.
connection._deferral = deferred;
@@ -471,14 +488,14 @@
parser.href = connection.url;
if (!parser.protocol || parser.protocol === ":") {
connection.protocol = window.document.location.protocol;
connection.host = window.document.location.host;
connection.baseUrl = connection.protocol + "//" + connection.host;
connection.host = parser.host || window.document.location.host;
} else {
connection.protocol = parser.protocol;
connection.host = parser.host;
connection.baseUrl = parser.protocol + "//" + parser.host;
}
connection.baseUrl = connection.protocol + "//" + connection.host;
// Set the websocket protocol
connection.wsProtocol = connection.protocol === "https:" ? "wss://" : "ws://";
@@ -587,7 +604,7 @@
window.clearTimeout(connection._.onFailedTimeoutHandle);
if (transport.supportsKeepAlive && connection._.keepAliveData.activated) {
if (supportsKeepAlive(connection)) {
signalR.transports._logic.monitorKeepAlive(connection);
}
@@ -647,23 +664,11 @@
url = signalR.transports._logic.prepareQueryString(connection, url);
// Add the client version to the negotiate request. We utilize the same addQs method here
// so that it can append the clientVersion appropriately to the URL
url = signalR.transports._logic.addQs(url, {
clientProtocol: connection.clientProtocol
});
connection.log("Negotiating with '" + url + "'.");
// Save the ajax negotiate request object so we can abort it if stop is called while the request is in flight.
connection._.negotiateRequest = $.ajax(
$.extend({}, $.signalR.ajaxDefaults, {
xhrFields: { withCredentials: connection.withCredentials },
connection._.negotiateRequest = signalR.transports._logic.ajax(connection, {
url: url,
type: "GET",
contentType: connection.contentType,
data: {},
dataType: connection.ajaxDataType,
error: function (error, statusText) {
// We don't want to cause any errors if we're aborting our own negotiate request.
if (statusText !== _negotiateAbortText) {
@@ -692,6 +697,7 @@
connection.id = res.ConnectionId;
connection.token = res.ConnectionToken;
connection.webSocketServerUrl = res.WebSocketServerUrl;
connection._.longPollDelay = res.LongPollDelay * 1000; // in ms
// Once the server has labeled the PersistentConnection as Disconnected, we should stop attempting to reconnect
// after res.DisconnectTimeout seconds.
@@ -748,8 +754,7 @@
initialize(transports);
}
}
));
});
return deferred.promise();
},
@@ -814,6 +819,7 @@
/// <returns type="signalR" />
var connection = this;
$(connection).bind(events.onError, function (e, errorData, sendData) {
connection.lastError = errorData;
// In practice 'errorData' is the SignalR built error object.
// In practice 'sendData' is undefined for all error events except those triggered by
// 'ajaxSend' and 'webSockets.send'.'sendData' is the original send payload.
@@ -883,7 +889,6 @@
}
// Always clean up private non-timeout based state.
delete connection._deferral;
delete connection._.config;
delete connection._.deferredStartHandler;
@@ -921,7 +926,7 @@
connection.transport.abort(connection, async);
}
if (connection.transport.supportsKeepAlive && connection._.keepAliveData.activated) {
if (supportsKeepAlive(connection)) {
signalR.transports._logic.stopMonitoringKeepAlive(connection);
}
@@ -934,15 +939,20 @@
delete connection._.negotiateRequest;
}
// Ensure that tryAbortStartRequest is called before connection._deferral is deleted
signalR.transports._logic.tryAbortStartRequest(connection);
// Trigger the disconnect event
$(connection).triggerHandler(events.onDisconnect);
delete connection._deferral;
delete connection.messageId;
delete connection.groupsToken;
delete connection.id;
delete connection._.pingIntervalId;
delete connection._.lastMessageAt;
delete connection._.lastActiveAt;
delete connection._.longPollDelay;
// Clear out our message buffer
connection._.connectingMessageBuffer.clear();
@@ -980,11 +990,11 @@
/// <reference path="jquery.signalR.core.js" />
(function ($, window, undefined) {
"use strict";
var signalR = $.signalR,
events = $.signalR.events,
changeState = $.signalR.changeState,
startAbortText = "__Start Aborted__",
transportLogic;
signalR.transports = {};
@@ -1029,36 +1039,43 @@
}
}
function addConnectionData(url, connectionData) {
var appender = url.indexOf("?") !== -1 ? "&" : "?";
function getAjaxUrl(connection, path) {
var url = connection.url + path;
if (connectionData) {
url += appender + "connectionData=" + window.encodeURIComponent(connectionData);
if (connection.transport) {
url += "?transport=" + connection.transport.name;
}
return url;
return transportLogic.prepareQueryString(connection, url);
}
transportLogic = signalR.transports._logic = {
ajax: function (connection, options) {
return $.ajax(
$.extend(/*deep copy*/ true, {}, $.signalR.ajaxDefaults, {
type: "GET",
data: {},
xhrFields: { withCredentials: connection.withCredentials },
contentType: connection.contentType,
dataType: connection.ajaxDataType
}, options));
},
pingServer: function (connection) {
/// <summary>Pings the server</summary>
/// <param name="connection" type="signalr">Connection associated with the server ping</param>
/// <returns type="signalR" />
var url, deferral = $.Deferred(), xhr;
var url,
xhr,
deferral = $.Deferred();
if (connection.transport) {
url = connection.url + "/ping";
url = transportLogic.addQs(url, connection.qs);
xhr = $.ajax(
$.extend({}, $.signalR.ajaxDefaults, {
xhrFields: { withCredentials: connection.withCredentials },
xhr = transportLogic.ajax(connection, {
url: url,
type: "GET",
contentType: connection.contentType,
data: {},
dataType: connection.ajaxDataType,
success: function (result) {
var data;
@@ -1084,7 +1101,7 @@
else {
deferral.reject(
signalR._.transportError(
signalR._.format(signalR.resources.pingServerFailedInvalidResponse, result.responseText),
signalR._.format(signalR.resources.pingServerFailedInvalidResponse, result),
connection.transport,
null /* error */,
xhr
@@ -1115,9 +1132,7 @@
);
}
}
}
));
});
}
else {
deferral.reject(
@@ -1132,9 +1147,23 @@
},
prepareQueryString: function (connection, url) {
url = transportLogic.addQs(url, connection.qs);
var preparedUrl;
return addConnectionData(url, connection.data);
// Use addQs to start since it handles the ?/& prefix for us
preparedUrl = transportLogic.addQs(url, "clientProtocol=" + connection.clientProtocol);
// Add the user-specified query string params if any
preparedUrl = transportLogic.addQs(preparedUrl, connection.qs);
if (connection.token) {
preparedUrl += "&connectionToken=" + window.encodeURIComponent(connection.token);
}
if (connection.data) {
preparedUrl += "&connectionData=" + window.encodeURIComponent(connection.data);
}
return preparedUrl;
},
addQs: function (url, qs) {
@@ -1166,7 +1195,7 @@
/// <summary>Gets the url for making a GET based connect request</summary>
var baseUrl = transport === "webSockets" ? "" : connection.baseUrl,
url = baseUrl + connection.appRelativeUrl,
qs = "transport=" + transport + "&connectionToken=" + window.encodeURIComponent(connection.token);
qs = "transport=" + transport;
if (connection.groupsToken) {
qs += "&groupsToken=" + window.encodeURIComponent(connection.groupsToken);
@@ -1219,21 +1248,17 @@
ajaxSend: function (connection, data) {
var payload = transportLogic.stringifySend(connection, data),
url = connection.url + "/send" + "?transport=" + connection.transport.name + "&connectionToken=" + window.encodeURIComponent(connection.token),
url = getAjaxUrl(connection, "/send"),
xhr,
onFail = function (error, connection) {
$(connection).triggerHandler(events.onError, [signalR._.transportError(signalR.resources.sendFailed, connection.transport, error, xhr), data]);
};
url = transportLogic.prepareQueryString(connection, url);
xhr = $.ajax(
$.extend({}, $.signalR.ajaxDefaults, {
xhrFields: { withCredentials: connection.withCredentials },
xhr = transportLogic.ajax(connection, {
url: url,
type: connection.ajaxDataType === "jsonp" ? "GET" : "POST",
contentType: signalR._.defaultContentType,
dataType: connection.ajaxDataType,
data: {
data: payload
},
@@ -1263,8 +1288,7 @@
onFail(error, connection);
}
}
));
});
return xhr;
},
@@ -1277,28 +1301,81 @@
// Async by default unless explicitly overidden
async = typeof async === "undefined" ? true : async;
var url = connection.url + "/abort" + "?transport=" + connection.transport.name + "&connectionToken=" + window.encodeURIComponent(connection.token);
url = transportLogic.prepareQueryString(connection, url);
var url = getAjaxUrl(connection, "/abort");
$.ajax(
$.extend({}, $.signalR.ajaxDefaults, {
xhrFields: { withCredentials: connection.withCredentials },
transportLogic.ajax(connection, {
url: url,
async: async,
timeout: 1000,
type: "POST",
contentType: connection.contentType,
dataType: connection.ajaxDataType,
data: {}
}
));
type: "POST"
});
connection.log("Fired ajax abort async = " + async + ".");
},
tryInitialize: function (persistentResponse, onInitialized) {
tryInitialize: function (connection, persistentResponse, onInitialized) {
var startUrl,
xhr,
rejectDeferred = function (error) {
var deferred = connection._deferral;
if (deferred) {
deferred.reject(error);
}
},
triggerStartError = function (error) {
$(connection).triggerHandler(events.onError, [error]);
rejectDeferred(error);
connection.stop();
};
if (persistentResponse.Initialized) {
startUrl = getAjaxUrl(connection, "/start");
xhr = transportLogic.ajax(connection, {
url: startUrl,
success: function (result) {
var data;
try {
data = connection._parseResponse(result);
} catch (error) {
triggerStartError(signalR._.error(
signalR._.format(signalR.resources.errorParsingStartResponse, result),
error, xhr));
return;
}
if (data.Response === "started") {
onInitialized();
} else {
triggerStartError(signalR._.error(
signalR._.format(signalR.resources.invalidStartResponse, result),
null /* error */, xhr));
}
},
error: function (error, statusText) {
if (statusText !== startAbortText) {
triggerStartError(signalR._.error(
signalR.resources.errorDuringStartRequest,
error, xhr));
} else {
// Stop has been called
rejectDeferred(signalR._.error(
signalR.resources.stoppedDuringStartRequest,
null /* error */, xhr));
}
}
});
connection._.startRequest = xhr;
}
},
tryAbortStartRequest: function (connection) {
if (connection._.startRequest) {
// If the start request has already completed this will noop.
connection._.startRequest.abort(startAbortText);
delete connection._.startRequest;
}
},
@@ -1317,14 +1394,6 @@
if (minData) {
data = transportLogic.maximizePersistentResponse(minData);
if (data.Disconnect) {
connection.log("Disconnect command received from server.");
// Disconnected by the server
connection.stop(false, false);
return;
}
transportLogic.updateGroups(connection, data.GroupsToken);
if (data.MessageId) {
@@ -1336,7 +1405,7 @@
transportLogic.triggerReceived(connection, message);
});
transportLogic.tryInitialize(data, onInitialized);
transportLogic.tryInitialize(connection, data, onInitialized);
}
}
},
@@ -1423,8 +1492,10 @@
verifyLastActive: function (connection) {
if (new Date().getTime() - connection._.lastActiveAt >= connection.reconnectWindow) {
connection.log("There has not been an active server connection for an extended period of time. Stopping connection.");
connection.stop();
var message = signalR._.format(signalR.resources.reconnectWindowTimeout, new Date(connection._.lastActiveAt), connection.reconnectWindow);
connection.log(message);
$(connection).triggerHandler(events.onError, [signalR._.error(message, /* source */ "TimeoutException")]);
connection.stop(/* async */ false, /* notifyServer */ false);
return false;
}
@@ -1487,7 +1558,6 @@
/// <reference path="jquery.signalR.transports.common.js" />
(function ($, window, undefined) {
"use strict";
var signalR = $.signalR,
events = $.signalR.events,
@@ -1497,7 +1567,9 @@
signalR.transports.webSockets = {
name: "webSockets",
supportsKeepAlive: true,
supportsKeepAlive: function () {
return true;
},
send: function (connection, data) {
var payload = transportLogic.stringifySend(connection, data);
@@ -1639,17 +1711,22 @@
/// <reference path="jquery.signalR.transports.common.js" />
(function ($, window, undefined) {
"use strict";
var signalR = $.signalR,
events = $.signalR.events,
changeState = $.signalR.changeState,
transportLogic = signalR.transports._logic;
transportLogic = signalR.transports._logic,
clearReconnectAttemptTimeout = function (connection) {
window.clearTimeout(connection._.reconnectAttemptTimeoutHandle);
delete connection._.reconnectAttemptTimeoutHandle;
};
signalR.transports.serverSentEvents = {
name: "serverSentEvents",
supportsKeepAlive: true,
supportsKeepAlive: function () {
return true;
},
timeOut: 3000,
@@ -1658,8 +1735,7 @@
opened = false,
$connection = $(connection),
reconnecting = !onSuccess,
url,
reconnectTimeout;
url;
if (connection.eventSource) {
connection.log("The connection already has an event source. Stopping it.");
@@ -1696,7 +1772,7 @@
}
if (reconnecting) {
reconnectTimeout = window.setTimeout(function () {
connection._.reconnectAttemptTimeoutHandle = window.setTimeout(function () {
if (opened === false) {
// If we're reconnecting and the event source is attempting to connect,
// don't keep retrying. This causes duplicate connections to spawn.
@@ -1712,10 +1788,7 @@
connection.eventSource.addEventListener("open", function (e) {
connection.log("EventSource connected.");
if (reconnectTimeout) {
window.clearTimeout(reconnectTimeout);
}
clearReconnectAttemptTimeout(connection);
transportLogic.clearReconnectTimeout(connection);
if (opened === false) {
@@ -1795,6 +1868,7 @@
stop: function (connection) {
// Don't trigger a reconnect after stopping
clearReconnectAttemptTimeout(connection);
transportLogic.clearReconnectTimeout(connection);
if (connection && connection.eventSource) {
@@ -1818,7 +1892,6 @@
/// <reference path="jquery.signalR.transports.common.js" />
(function ($, window, undefined) {
"use strict";
var signalR = $.signalR,
events = $.signalR.events,
@@ -1873,7 +1946,9 @@
signalR.transports.foreverFrame = {
name: "foreverFrame",
supportsKeepAlive: true,
supportsKeepAlive: function () {
return true;
},
// Added as a value here so we can create tests to verify functionality
iframeClearThreshold: 50,
@@ -1963,9 +2038,21 @@
receive: function (connection, data) {
var cw,
body;
body,
response;
transportLogic.processMessages(connection, data, connection.onSuccess);
if (connection.json !== connection._originalJson) {
// If there's a custom JSON parser configured then serialize the object
// using the original (browser) JSON parser and then deserialize it using
// the custom parser (connection._parseResponse does that). This is so we
// can easily send the response from the server as "raw" JSON but still
// support custom JSON deserialization in the browser.
data = connection._originalJson.stringify(data);
}
response = connection._parseResponse(data);
transportLogic.processMessages(connection, response, connection.onSuccess);
// Protect against connection stopping from a callback trigger within the processMessages above.
if (connection.state === $.signalR.connectionState.connected) {
@@ -2049,18 +2136,33 @@
/// <reference path="jquery.signalR.transports.common.js" />
(function ($, window, undefined) {
"use strict";
var signalR = $.signalR,
events = $.signalR.events,
changeState = $.signalR.changeState,
isDisconnecting = $.signalR.isDisconnecting,
transportLogic = signalR.transports._logic;
transportLogic = signalR.transports._logic,
browserSupportsXHRProgress = (function () {
try {
return "onprogress" in new window.XMLHttpRequest();
} catch (e) {
// No XHR means no XHR progress event
return false;
}
})();
signalR.transports.longPolling = {
name: "longPolling",
supportsKeepAlive: false,
supportsKeepAlive: function (connection) {
return browserSupportsXHRProgress &&
connection.ajaxDataType !== "jsonp" &&
// Don't check for keep alives if there is a delay configured between poll requests.
// Don't check for keep alives if the server didn't send back the "LongPollDelay" as
// part of the response to /negotiate. That indicates the server is running an older
// version of SignalR that doesn't send long polling keep alives.
connection._.longPollDelay === 0;
},
reconnectDelay: 3000,
@@ -2071,10 +2173,11 @@
fireConnect = function () {
fireConnect = $.noop;
connection.log("LongPolling connected.");
onSuccess();
// Reset onFailed to null because it shouldn't be called again
onFailed = null;
connection.log("LongPolling connected.");
onSuccess();
},
tryFailConnect = function () {
if (onFailed) {
@@ -2126,13 +2229,13 @@
}
connection.log("Opening long polling request to '" + url + "'.");
instance.pollXhr = $.ajax(
$.extend({}, $.signalR.ajaxDefaults, {
xhrFields: { withCredentials: connection.withCredentials },
instance.pollXhr = transportLogic.ajax(connection, {
xhrFields: {
onprogress: function () {
transportLogic.markLastMessage(connection);
}
},
url: url,
type: "GET",
dataType: connection.ajaxDataType,
contentType: connection.contentType,
success: function (result) {
var minData,
delay = 0,
@@ -2146,6 +2249,7 @@
reconnectErrors = 0;
try {
// Remove any keep-alives from the beginning of the result
minData = connection._parseResponse(result);
}
catch (error) {
@@ -2240,9 +2344,7 @@
}, that.reconnectDelay);
}
}
}
));
});
// This will only ever pass after an error has occured via the poll ajax procedure.
if (reconnecting && raiseReconnect === true) {
@@ -2258,7 +2360,9 @@
},
lostConnection: function (connection) {
throw new Error("Lost Connection not handled for LongPolling");
if (connection.pollXhr) {
connection.pollXhr.abort("lostConnection");
}
},
send: function (connection, data) {
@@ -2295,7 +2399,6 @@
/// <reference path="jquery.signalR.core.js" />
(function ($, window, undefined) {
"use strict";
var eventNamespace = ".hubProxy",
signalR = $.signalR;
@@ -2458,7 +2561,15 @@
// Update the hub state
$.extend(that.state, result.State);
if (result.Error) {
if (result.Progress) {
if (d.notifyWith) {
// Progress is only supported in jQuery 1.7+
d.notifyWith(that, [result.Progress.Data]);
} else if(!connection._.progressjQueryVersionLogged) {
connection.log("A hub method invocation progress update was received but the version of jQuery in use (" + $.prototype.jquery + ") does not support progress updates. Upgrade to jQuery 1.7+ to receive progress notifications.");
connection._.progressjQueryVersionLogged = true;
}
} else if (result.Error) {
// Server hub method threw an exception, log it & reject the deferred
if (result.StackTrace) {
connection.log(result.Error + "\n" + result.StackTrace + ".");
@@ -2495,6 +2606,10 @@
return {
State: minHubResponse.S,
Result: minHubResponse.R,
Progress: minHubResponse.P ? {
Id: minHubResponse.P.I,
Data: minHubResponse.P.D
} : null,
Id: minHubResponse.I,
IsHubException: minHubResponse.H,
Error: minHubResponse.E,
@@ -2553,7 +2668,17 @@
return;
}
if (typeof (minData.I) !== "undefined") {
// We have to handle progress updates first in order to ensure old clients that receive
// progress updates enter the return value branch and then no-op when they can't find
// the callback in the map (because the minData.I value will not be a valid callback ID)
if (typeof (minData.P) !== "undefined") {
// Process progress notification
dataCallbackId = minData.P.I.toString();
callback = connection._.invocationCallbacks[dataCallbackId];
if (callback) {
callback.method.call(callback.scope, minData);
}
} else if (typeof (minData.I) !== "undefined") {
// We received the return value from a server method invocation, look up callback by id and call it
dataCallbackId = minData.I.toString();
callback = connection._.invocationCallbacks[dataCallbackId];
@@ -2690,12 +2815,12 @@
/*global window:false */
/// <reference path="jquery.signalR.core.js" />
(function ($, undefined) {
$.signalR.version = "2.0.3";
$.signalR.version = "2.1.0";
}(window.jQuery));
///#source 1 1 /ClientSource/Scripts/Modules/jQuery-SignalR/disco-hubs.js
/*!
* ASP.NET SignalR JavaScript Library v2.0.3
* ASP.NET SignalR JavaScript Library v2.1.0
* http://signalr.net/
*
* Copyright Microsoft Open Technologies, Inc. All rights reserved.
@@ -2774,37 +2899,38 @@
registerHubProxies(proxies, false);
});
proxies.deviceUpdates = this.createHubProxy('deviceUpdates');
proxies.deviceUpdates.client = { };
proxies.deviceUpdates.server = {
proxies['deviceUpdates'] = this.createHubProxy('deviceUpdates');
proxies['deviceUpdates'].client = { };
proxies['deviceUpdates'].server = {
};
proxies.jobUpdates = this.createHubProxy('jobUpdates');
proxies.jobUpdates.client = { };
proxies.jobUpdates.server = {
proxies['jobUpdates'] = this.createHubProxy('jobUpdates');
proxies['jobUpdates'].client = { };
proxies['jobUpdates'].server = {
};
proxies.logNotifications = this.createHubProxy('logNotifications');
proxies.logNotifications.client = { };
proxies.logNotifications.server = {
proxies['logNotifications'] = this.createHubProxy('logNotifications');
proxies['logNotifications'].client = { };
proxies['logNotifications'].server = {
};
proxies.noticeboardUpdates = this.createHubProxy('noticeboardUpdates');
proxies.noticeboardUpdates.client = { };
proxies.noticeboardUpdates.server = {
proxies['noticeboardUpdates'] = this.createHubProxy('noticeboardUpdates');
proxies['noticeboardUpdates'].client = { };
proxies['noticeboardUpdates'].server = {
};
proxies.scheduledTaskNotifications = this.createHubProxy('scheduledTaskNotifications');
proxies.scheduledTaskNotifications.client = { };
proxies.scheduledTaskNotifications.server = {
proxies['scheduledTaskNotifications'] = this.createHubProxy('scheduledTaskNotifications');
proxies['scheduledTaskNotifications'].client = { };
proxies['scheduledTaskNotifications'].server = {
getStatus: function () {
return proxies.scheduledTaskNotifications.invoke.apply(proxies.scheduledTaskNotifications, $.merge(["GetStatus"], $.makeArray(arguments)));
/// <summary>Calls the GetStatus method on the server-side scheduledTaskNotifications hub.&#10;Returns a jQuery.Deferred() promise.</summary>
return proxies['scheduledTaskNotifications'].invoke.apply(proxies['scheduledTaskNotifications'], $.merge(["GetStatus"], $.makeArray(arguments)));
}
};
proxies.userUpdates = this.createHubProxy('userUpdates');
proxies.userUpdates.client = { };
proxies.userUpdates.server = {
proxies['userUpdates'] = this.createHubProxy('userUpdates');
proxies['userUpdates'].client = { };
proxies['userUpdates'].server = {
};
return proxies;
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<bundle minify="true" runOnBuild="true">
<file>/ClientSource/Scripts/Modules/jQuery-SignalR/jquery.signalR-2.0.3.js</file>
<file>/ClientSource/Scripts/Modules/jQuery-SignalR/jquery.signalR-2.1.0.js</file>
<file>/ClientSource/Scripts/Modules/jQuery-SignalR/disco-hubs.js</file>
</bundle>
@@ -1,4 +1,4 @@
(function(n,t,i){"use strict";function p(t,i){var u,f;if(n.isArray(t)){for(u=t.length-1;u>=0;u--)f=t[u],n.type(f)==="string"&&r.transports[f]||(i.log("Invalid transport: "+f+", removing it from the transports list."),t.splice(u,1));t.length===0&&(i.log("No transports remain within the specified transport array."),t=null)}else if(r.transports[t]||t==="auto"){if(t==="auto"&&r._.ieVersion<=8)return["longPolling"]}else i.log("Invalid transport: "+t.toString()+"."),t=null;return t}function w(n){return n==="http:"?80:n==="https:"?443:void 0}function l(n,t){return t.match(/:\d+$/)?t:t+":"+w(n)}function b(t,i){var u=this,r=[];u.tryBuffer=function(i){return t.state===n.signalR.connectionState.connecting?(r.push(i),!0):!1};u.drain=function(){if(t.state===n.signalR.connectionState.connected)while(r.length>0)i(r.shift())};u.clear=function(){r=[]}}var f={nojQuery:"jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.",noTransportOnInit:"No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.",errorOnNegotiate:"Error during negotiation request.",stoppedWhileLoading:"The connection was stopped during page load.",stoppedWhileNegotiating:"The connection was stopped during the negotiate request.",errorParsingNegotiateResponse:"Error parsing negotiate response.",protocolIncompatible:"You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.",sendFailed:"Send failed.",parseFailed:"Failed at parsing response: {0}",longPollFailed:"Long polling request failed.",eventSourceFailedToConnect:"EventSource failed to connect.",eventSourceError:"Error raised by EventSource",webSocketClosed:"WebSocket closed.",pingServerFailedInvalidResponse:"Invalid ping response when pinging server: '{0}'.",pingServerFailed:"Failed to ping server.",pingServerFailedStatusCode:"Failed to ping server. Server responded with status code {0}, stopping the connection.",pingServerFailedParse:"Failed to parse ping server response, stopping the connection.",noConnectionTransport:"Connection is in an invalid state, there is no transport active.",webSocketsInvalidState:"The Web Socket transport is in an invalid state, transitioning into reconnecting."};if(typeof n!="function")throw new Error(f.nojQuery);var r,h,s=t.document.readyState==="complete",e=n(t),c="__Negotiate Aborted__",u={onStart:"onStart",onStarting:"onStarting",onReceived:"onReceived",onError:"onError",onConnectionSlow:"onConnectionSlow",onReconnecting:"onReconnecting",onReconnect:"onReconnect",onStateChanged:"onStateChanged",onDisconnect:"onDisconnect"},a=function(n,i){if(i!==!1){var r;typeof t.console!="undefined"&&(r="["+(new Date).toTimeString()+"] SignalR: "+n,t.console.debug?t.console.debug(r):t.console.log&&t.console.log(r))}},o=function(t,i,r){return i===t.state?(t.state=r,n(t).triggerHandler(u.onStateChanged,[{oldState:i,newState:r}]),!0):!1},v=function(n){return n.state===r.connectionState.disconnected},y=function(n){var i,u;n._.configuredStopReconnectingTimeout||(u=function(n){n.log("Couldn't reconnect within the configured timeout ("+n.disconnectTimeout+"ms), disconnecting.");n.stop(!1,!1)},n.reconnecting(function(){var n=this;n.state===r.connectionState.reconnecting&&(i=t.setTimeout(function(){u(n)},n.disconnectTimeout))}),n.stateChanged(function(n){n.oldState===r.connectionState.reconnecting&&t.clearTimeout(i)}),n._.configuredStopReconnectingTimeout=!0)};r=function(n,t,i){return new r.fn.init(n,t,i)};r._={defaultContentType:"application/x-www-form-urlencoded; charset=UTF-8",ieVersion:function(){var i,n;return t.navigator.appName==="Microsoft Internet Explorer"&&(n=/MSIE ([0-9]+\.[0-9]+)/.exec(t.navigator.userAgent),n&&(i=t.parseFloat(n[1]))),i}(),error:function(n,t,i){var r=new Error(n);return r.source=t,typeof i!="undefined"&&(r.context=i),r},transportError:function(n,t,r,u){var f=this.error(n,r,u);return f.transport=t?t.name:i,f},format:function(){for(var t=arguments[0],n=0;n<arguments.length-1;n++)t=t.replace("{"+n+"}",arguments[n+1]);return t},firefoxMajorVersion:function(n){var t=n.match(/Firefox\/(\d+)/);return!t||!t.length||t.length<2?0:parseInt(t[1],10)},configurePingInterval:function(i){var f=i._.config,e=function(t){n(i).triggerHandler(u.onError,[t])};f&&!i._.pingIntervalId&&f.pingInterval&&(i._.pingIntervalId=t.setInterval(function(){r.transports._logic.pingServer(i).fail(e)},f.pingInterval))}};r.events=u;r.resources=f;r.ajaxDefaults={processData:!0,timeout:null,async:!0,global:!1,cache:!1};r.changeState=o;r.isDisconnecting=v;r.connectionState={connecting:0,connected:1,reconnecting:2,disconnected:4};r.hub={start:function(){throw new Error("SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. <script src='/signalr/js'><\/script>.");}};e.load(function(){s=!0});r.fn=r.prototype={init:function(t,i,r){var f=n(this);this.url=t;this.qs=i;this._={keepAliveData:{},connectingMessageBuffer:new b(Line truncated
(function(n,t,i){function w(t,i){var u,f;if(n.isArray(t)){for(u=t.length-1;u>=0;u--)f=t[u],n.type(f)==="string"&&r.transports[f]||(i.log("Invalid transport: "+f+", removing it from the transports list."),t.splice(u,1));t.length===0&&(i.log("No transports remain within the specified transport array."),t=null)}else if(r.transports[t]||t==="auto"){if(t==="auto"&&r._.ieVersion<=8)return["longPolling"]}else i.log("Invalid transport: "+t.toString()+"."),t=null;return t}function b(n){return n==="http:"?80:n==="https:"?443:void 0}function a(n,t){return t.match(/:\d+$/)?t:t+":"+b(n)}function k(t,i){var u=this,r=[];u.tryBuffer=function(i){return t.state===n.signalR.connectionState.connecting?(r.push(i),!0):!1};u.drain=function(){if(t.state===n.signalR.connectionState.connected)while(r.length>0)i(r.shift())};u.clear=function(){r=[]}}var f={nojQuery:"jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.",noTransportOnInit:"No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.",errorOnNegotiate:"Error during negotiation request.",stoppedWhileLoading:"The connection was stopped during page load.",stoppedWhileNegotiating:"The connection was stopped during the negotiate request.",errorParsingNegotiateResponse:"Error parsing negotiate response.",errorDuringStartRequest:"Error during start request. Stopping the connection.",stoppedDuringStartRequest:"The connection was stopped during the start request.",errorParsingStartResponse:"Error parsing start response: '{0}'. Stopping the connection.",invalidStartResponse:"Invalid start response: '{0}'. Stopping the connection.",protocolIncompatible:"You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.",sendFailed:"Send failed.",parseFailed:"Failed at parsing response: {0}",longPollFailed:"Long polling request failed.",eventSourceFailedToConnect:"EventSource failed to connect.",eventSourceError:"Error raised by EventSource",webSocketClosed:"WebSocket closed.",pingServerFailedInvalidResponse:"Invalid ping response when pinging server: '{0}'.",pingServerFailed:"Failed to ping server.",pingServerFailedStatusCode:"Failed to ping server. Server responded with status code {0}, stopping the connection.",pingServerFailedParse:"Failed to parse ping server response, stopping the connection.",noConnectionTransport:"Connection is in an invalid state, there is no transport active.",webSocketsInvalidState:"The Web Socket transport is in an invalid state, transitioning into reconnecting.",reconnectTimeout:"Couldn't reconnect within the configured timeout of {0} ms, disconnecting.",reconnectWindowTimeout:"The client has been inactive since {0} and it has exceeded the inactivity timeout of {1} ms. Stopping the connection."};if(typeof n!="function")throw new Error(f.nojQuery);var r,h,s=t.document.readyState==="complete",e=n(t),c="__Negotiate Aborted__",u={onStart:"onStart",onStarting:"onStarting",onReceived:"onReceived",onError:"onError",onConnectionSlow:"onConnectionSlow",onReconnecting:"onReconnecting",onReconnect:"onReconnect",onStateChanged:"onStateChanged",onDisconnect:"onDisconnect"},v=function(n,i){if(i!==!1){var r;typeof t.console!="undefined"&&(r="["+(new Date).toTimeString()+"] SignalR: "+n,t.console.debug?t.console.debug(r):t.console.log&&t.console.log(r))}},o=function(t,i,r){return i===t.state?(t.state=r,n(t).triggerHandler(u.onStateChanged,[{oldState:i,newState:r}]),!0):!1},y=function(n){return n.state===r.connectionState.disconnected},l=function(n){return n._.keepAliveData.activated&&n.transport.supportsKeepAlive(n)},p=function(i){var f,e;i._.configuredStopReconnectingTimeout||(e=function(t){var i=r._.format(r.resources.reconnectTimeout,t.disconnectTimeout);t.log(i);n(t).triggerHandler(u.onError,[r._.error(i,"TimeoutException")]);t.stop(!1,!1)},i.reconnecting(function(){var n=this;n.state===r.connectionState.reconnecting&&(f=t.setTimeout(function(){e(n)},n.disconnectTimeout))}),i.stateChanged(function(n){n.oldState===r.connectionState.reconnecting&&t.clearTimeout(f)}),i._.configuredStopReconnectingTimeout=!0)};r=function(n,t,i){return new r.fn.init(n,t,i)};r._={defaultContentType:"application/x-www-form-urlencoded; charset=UTF-8",ieVersion:function(){var i,n;return t.navigator.appName==="Microsoft Internet Explorer"&&(n=/MSIE ([0-9]+\.[0-9]+)/.exec(t.navigator.userAgent),n&&(i=t.parseFloat(n[1]))),i}(),error:function(n,t,i){var r=new Error(n);return r.source=t,typeof i!="undefined"&&(r.context=i),r},transportError:function(n,t,r,u){var f=this.error(n,r,u);return f.transport=t?t.name:i,f},format:function(){for(var t=arguments[0],n=0;n<arguments.length-1;n++)t=t.replace("{"+n+"}",arguments[n+1]);return t},firefoxMajorVersion:function(n){var t=n.match(/Firefox\/(\d+)/);return!t||!t.length||t.length<2?0:parseInt(t[1],10)},configurePingInterval:function(i){var f=i._.config,e=function(t){n(i).triggerHandler(u.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X,OAVI/E,CAAMgF,UAAUC,QAAS,GAAI,6B,GAE7BF,CAAQ,CAAyB,uBAAAG,KAAK,CAAClF,CAAMgF,UAAUG,UAAjB,CAA4B,CAE9DJ,C,GACAD,CAAQ,CAAE9E,CAAMoF,WAAW,CAACL,CAAQ,CAAA,CAAA,CAAT,GAAY,CAKxCD,CAda,CAetB,CAAA,CAAE,CAEJ,KAAK,CAAEO,QAAS,CAACzD,CAAO,CAAE0D,CAAM,CAAEC,CAAlB,CAA2B,CACvC,IAAIC,EAAI,IAAIhD,KAAK,CAACZ,CAAD,CAAS,CAO1B,OANA4D,CAACF,OAAQ,CAAEA,CAAM,CAEb,OAAOC,CAAQ,EAAI,W,GACnBC,CAACD,QAAS,CAAEA,EAAO,CAGhBC,CARgC,CAS1C,CAED,cAAc,CAAEC,QAAS,CAAC7D,CAAO,CAAEtB,CAAS,CAAEgF,CAAM,CAAEC,CAA7B,CAAsC,CAC3D,IAAIC,EAAI,IAAIH,MAAM,CAACzD,CAAO,CAAE0D,CAAM,CAAEC,CAAlB,CAA0B,CAE5C,OADAC,CAAClF,UAAW,CAAEA,CAAU,CAAEA,CAASoF,KAAM,CAAEzF,CAAS,CAC7CuF,CAHoD,CAI9D,CAED,MAAM,CAAEG,QAAS,CAAA,CAAG,CAGhB,IAAK,IADDC,EAAIC,SAAU,CAAA,CAAA,EACTxF,EAAI,CAAC,CAAEA,CAAE,CAAEwF,SAASrF,OAAQ,CAAE,CAAC,CAAEH,CAAC,EAA3C,CACIuF,CAAE,CAAEA,CAACE,QAAQ,CAAC,GAAI,CAAEzF,CAAE,CAAE,GAAG,CAAEwF,SAAU,CAAAxF,CAAE,CAAE,CAAJ,CAA1B,CACjB,CACA,OAAOuF,CANS,CAOnLine truncated
"sources":["/ClientSource/Scripts/Modules/jQuery-SignalR/jquery.signalR-2.0.3.js","/ClientSource/Scripts/Modules/jQuery-SignalR/disco-hubs.js"],
"names":["$","window","undefined","validateTransport","requestedTransport","connection","i","transport","isArray","length","type","signalR","transports","log","splice","_","ieVersion","toString","getDefaultPort","protocol","addDefaultPort","url","match","ConnectingMessageBuffer","drainCallback","that","buffer","tryBuffer","that.tryBuffer","message","state","connectionState","connecting","push","drain","that.drain","connected","shift","clear","that.clear","resources","Error","nojQuery","_connection","_pageLoaded","document","readyState","_pageWindow","_negotiateAbortText","events","msg","logging","m","console","Date","toTimeString","debug","changeState","expectedState","newState","triggerHandler","onStateChanged","isDisconnecting","disconnected","configureStopReconnectingTimeout","stopReconnectingTimeout","onReconnectTimeout","configuredStopReconnectingTimeout","disconnectTimeout","stop","reconnecting","setTimeout","stateChanged","data","oldState","clearTimeout","qs","fn","init","version","matches","navigator","appName","exec","userAgent","parseFloat","error","source","context","e","transportError","name","format","s","arguments","replace","firefoxMajorVersion","parseInt","configurePingInterval","config","onFail","onError","pingIntervalId","pingInterval","setInterval","_logic","pingServer","fail","ajaxDefaults","hub","start","load","prototype","$connection","connectingMessageBuffer","onReceived","getTime","_parseResponse","response","json","parse","JSON","isCrossDomain","against","link","trim","location","indexOf","createElement","href","host","options","callback","initialize","deferred","_deferral","Deferred","parser","onFailed","extend","waitForPageLoad","deferredStartHandler","connection._.deferredStartHandler","bind","promise","resolve","baseUrl","wsProtocol","jsonp","withCredentials","support","cors","contentType","defaultContentType","ajaxDataType","onStart","call","index","noTransportError","noTransportOnInit","reject","transportName","initializationComplete","onFailedTimeoutHandle","totalTransportConnectTimeout","isFirefox11OrGreater","asyncAbort","supportsKeepAlive","keepAliveData","activated","monitorKeepAlive","startHeartbeat","err","errorOnNegotiate","negotiateRequest","onStarting","prepareQueryString","addQs","clientProtocol","ajax","statusText","stoppedWhileNegotiating","success","result","res","protocolError","supportedTransports","errorParsingNegotiateResponse","appRelativeUrl","Url","id","ConnectionId","token","ConnectionToken","webSocketServerUrl","WebSocketServerUrl","DisconnectTimeout","transportConnectTimeout","TransportConnectTimeout","KeepAliveTimeout","timeout","timeoutWarning","keepAliveWarnAt","beatInterval","reconnectWindow","ProtocolVersion","protocolIncompatible","each","key","TryWebSockets","inArray","starting","send","received","errorData","sendData","onDisconnect","connectionSlow","onConnectionSlow","onReconnecting","reconnected","onReconnect","async","notifyServer","deferral","unbind","stoppedWhileLoading","beatHandle","clearInterval","abort","stopMonitoringKeepAlive","messageId","groupsToken","lastMessageAt","lastActiveAt","noConflict","signalR.noConflict","jQuery","beat","monitoring","checkIfAlive","transportLogic","markActive","timeElapsed","lostConnection","userNotified","addConnectionData","connectionData","appender","encodeURIComponent","xhr","pingServerFailedParse","Response","pingServerFailedInvalidResponse","responseText","status","pingServerFailedStatusCode","pingServerFailed","noConnectionTransport","firstChar","param","charAt","getUrl","poll","Math","floor","random","maximizePersistentResponse","minPersistentResponse","C","M","S","D","T","L","G","updateGroups","stringifySend","stringify","ajaxSend","payload","sendFailed","triggerReceived","textStatus","ajaxAbort","tryInitialize","persistentResponse","onInitialized","Initialized","processMessages","minData","markLastMessage","Disconnect","GroupsToken","MessageId","Messages","reconnectKeepAliveUpdate","connection._.keepAliveData.reconnectKeepAliveUpdate","verifyLastActive","isConnectedOrReconnecting","ensureReconnectingState","clearReconnectTimeout","reconnectTimeout","reconnect","reconnectDelay","handleParseFailure","parseFailed","webSockets","socket","ex","webSocketsInvalidState","onSuccess","opened","WebSocket","onopen","connection.socket.onopen","onclose","connection.socket.onclose","event","wasClean","webSocketClosed","reason","onmessage","connection.socket.onmessage","isEmptyObject","close","serverSentEvents","eventSource","EventSource","Message","eventSourceFailedToConnect","OPEN","timeOut","addEventListener","eventPhase","CLOSED","eventSourceError","createFrame","frame","setAttribute","loadPreventer","loadingFixIntervalId","loadingFixInterval","attachedTo","prevent","tempFrame","body","appendChild","removeChild","cancel","foreverFrame","frameId","count","frameLoadHandler","attachEvent","src","connections","connection.onSuccess","receive","cw","frameMessageCount","iframeClearThreshold","contentWindow","conteLine truncated
"mappings":"CAYC,QAAS,CAACA,CAAC,CAAEC,CAAM,CAAEC,CAAZ,CAAuB,CA+O7BC,SAASA,CAAiB,CAACC,C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AAA,EA9BA,CAgCxD,CAEL3D,CAAQ,CAAEA,QAAS,CAACU,CAAG,CAAE8D,CAAE,CAAEhC,CAAV,CAAmB,CAalC,OAAO,IAAIxC,CAAOyE,GAAGC,KAAK,CAAChE,CAAG,CAAE8D,CAAE,CAAEhC,CAAV,CAbQ,CAcrC,CAEDxC,CAAOI,EAAG,CAAE,CACR,kBAAkB,CAAE,kDAAkD,CAEtE,SAAS,CAAG,QAAS,CAAA,CAAG,CACpB,IAAIuE,EACAC,CAAO,CAYX,OAVItF,CAAMuF,UAAUC,QAAS,GAAI,6B,GAE7BF,CAAQ,CAAyB,uBAAAG,KAAK,CAACzF,CAAMuF,UAAUG,UAAjB,CAA4B,CAE9DJ,C,GACAD,CAAQ,CAAErF,CAAM2F,WAAW,CAACL,CAAQ,CAAA,CAAA,CAAT,GAAY,CAKxCD,CAda,CAetB,CAAA,CAAE,CAEJ,KAAK,CAAEX,QAAS,CAAC9C,CAAO,CAAEgE,CAAM,CAAEC,CAAlB,CAA2B,CACvC,IAAIC,EAAI,IAAItD,KAAK,CAACZ,CAAD,CAAS,CAO1B,OANAkE,CAACF,OAAQ,CAAEA,CAAM,CAEb,OAAOC,CAAQ,EAAI,W,GACnBC,CAACD,QAAS,CAAEA,EAAO,CAGhBC,CARgC,CAS1C,CAED,cAAc,CAAEC,QAAS,CAACnE,CAAO,CAAEtB,CAAS,CAAEsF,CALine truncated
"sources":["/ClientSource/Scripts/Modules/jQuery-SignalR/jquery.signalR-2.1.0.js","/ClientSource/Scripts/Modules/jQuery-SignalR/disco-hubs.js"],
"names":["$","window","undefined","validateTransport","requestedTransport","connection","i","transport","isArray","length","type","signalR","transports","log","splice","_","ieVersion","toString","getDefaultPort","protocol","addDefaultPort","url","match","ConnectingMessageBuffer","drainCallback","that","buffer","tryBuffer","that.tryBuffer","message","state","connectionState","connecting","push","drain","that.drain","connected","shift","clear","that.clear","resources","Error","nojQuery","_connection","_pageLoaded","document","readyState","_pageWindow","_negotiateAbortText","events","msg","logging","m","console","Date","toTimeString","debug","changeState","expectedState","newState","triggerHandler","onStateChanged","isDisconnecting","disconnected","supportsKeepAlive","keepAliveData","activated","configureStopReconnectingTimeout","stopReconnectingTimeout","onReconnectTimeout","configuredStopReconnectingTimeout","format","reconnectTimeout","disconnectTimeout","onError","error","stop","reconnecting","setTimeout","stateChanged","data","oldState","clearTimeout","qs","fn","init","version","matches","navigator","appName","exec","userAgent","parseFloat","source","context","e","transportError","name","s","arguments","replace","firefoxMajorVersion","parseInt","configurePingInterval","config","onFail","pingIntervalId","pingInterval","setInterval","_logic","pingServer","fail","ajaxDefaults","hub","start","load","prototype","$connection","lastError","connectingMessageBuffer","onReceived","getTime","_parseResponse","response","json","parse","JSON","isCrossDomain","against","link","trim","location","indexOf","createElement","href","host","options","callback","initialize","deferred","_deferral","Deferred","parser","onFailed","extend","waitForPageLoad","deferredStartHandler","connection._.deferredStartHandler","bind","promise","resolve","baseUrl","wsProtocol","jsonp","withCredentials","support","cors","contentType","defaultContentType","ajaxDataType","onStart","call","index","noTransportError","noTransportOnInit","reject","transportName","initializationComplete","onFailedTimeoutHandle","totalTransportConnectTimeout","isFirefox11OrGreater","asyncAbort","monitorKeepAlive","startHeartbeat","err","errorOnNegotiate","negotiateRequest","onStarting","prepareQueryString","ajax","statusText","stoppedWhileNegotiating","success","result","res","protocolError","supportedTransports","errorParsingNegotiateResponse","appRelativeUrl","Url","id","ConnectionId","token","ConnectionToken","webSocketServerUrl","WebSocketServerUrl","longPollDelay","LongPollDelay","DisconnectTimeout","transportConnectTimeout","TransportConnectTimeout","KeepAliveTimeout","timeout","timeoutWarning","keepAliveWarnAt","beatInterval","reconnectWindow","ProtocolVersion","clientProtocol","protocolIncompatible","each","key","TryWebSockets","inArray","starting","send","received","errorData","sendData","onDisconnect","connectionSlow","onConnectionSlow","onReconnecting","reconnected","onReconnect","async","notifyServer","deferral","unbind","stoppedWhileLoading","beatHandle","clearInterval","abort","stopMonitoringKeepAlive","tryAbortStartRequest","messageId","groupsToken","lastMessageAt","lastActiveAt","noConflict","signalR.noConflict","jQuery","beat","monitoring","checkIfAlive","transportLogic","markActive","timeElapsed","lostConnection","userNotified","getAjaxUrl","path","startAbortText","xhr","addQs","pingServerFailedParse","Response","pingServerFailedInvalidResponse","status","pingServerFailedStatusCode","pingServerFailed","noConnectionTransport","preparedUrl","encodeURIComponent","appender","firstChar","param","charAt","getUrl","poll","Math","floor","random","maximizePersistentResponse","minPersistentResponse","C","M","S","D","T","L","G","updateGroups","stringifySend","stringify","ajaxSend","payload","sendFailed","triggerReceived","textStatus","ajaxAbort","tryInitialize","persistentResponse","onInitialized","startUrl","rejectDeferred","triggerStartError","Initialized","errorParsingStartResponse","invalidStartResponse","errorDuringStartRequest","stoppedDuringStartRequest","startRequest","processMessages","minData","markLastMessage","GroupsToken","MessageId","Messages","reconnectKeepAliveUpdate","connection._.keepAliveData.reconnectKeepAliveUpdate","verifyLastActive","isConnectedOrReconnecting","ensureReconnectingState","clearReconnectTimeout","reconnectWindowTimeout","reconnect","reconnectDelay","handleParseFailure","parseFailed","webSockets","socket","ex","webSocketsInvalidState","onSuccess","opened","WebSocket","onopen","connection.socket.onopen","onclose","connection.socket.onclose","event","wasClean","webSocketClosed","reason","onmessage","connection.socket.onmessage","isEmptyObject","close","clearReconnectAttemptTimeout","reconnectAttemptTimeoutHandle","serverSentEvents","eventSource","EventSource","Message","eventSourceFailedToConnect","OPEN","timeOut","addEventListener","eventPhase","CLOSED","eventSourceError","createFrame","frame","setAttribute","loadPreventer","loLine truncated
}
@@ -1,5 +1,5 @@
/*!
* ASP.NET SignalR JavaScript Library v2.0.3
* ASP.NET SignalR JavaScript Library v2.1.0
* http://signalr.net/
*
* Copyright Microsoft Open Technologies, Inc. All rights reserved.
@@ -78,37 +78,38 @@
registerHubProxies(proxies, false);
});
proxies.deviceUpdates = this.createHubProxy('deviceUpdates');
proxies.deviceUpdates.client = { };
proxies.deviceUpdates.server = {
proxies['deviceUpdates'] = this.createHubProxy('deviceUpdates');
proxies['deviceUpdates'].client = { };
proxies['deviceUpdates'].server = {
};
proxies.jobUpdates = this.createHubProxy('jobUpdates');
proxies.jobUpdates.client = { };
proxies.jobUpdates.server = {
proxies['jobUpdates'] = this.createHubProxy('jobUpdates');
proxies['jobUpdates'].client = { };
proxies['jobUpdates'].server = {
};
proxies.logNotifications = this.createHubProxy('logNotifications');
proxies.logNotifications.client = { };
proxies.logNotifications.server = {
proxies['logNotifications'] = this.createHubProxy('logNotifications');
proxies['logNotifications'].client = { };
proxies['logNotifications'].server = {
};
proxies.noticeboardUpdates = this.createHubProxy('noticeboardUpdates');
proxies.noticeboardUpdates.client = { };
proxies.noticeboardUpdates.server = {
proxies['noticeboardUpdates'] = this.createHubProxy('noticeboardUpdates');
proxies['noticeboardUpdates'].client = { };
proxies['noticeboardUpdates'].server = {
};
proxies.scheduledTaskNotifications = this.createHubProxy('scheduledTaskNotifications');
proxies.scheduledTaskNotifications.client = { };
proxies.scheduledTaskNotifications.server = {
proxies['scheduledTaskNotifications'] = this.createHubProxy('scheduledTaskNotifications');
proxies['scheduledTaskNotifications'].client = { };
proxies['scheduledTaskNotifications'].server = {
getStatus: function () {
return proxies.scheduledTaskNotifications.invoke.apply(proxies.scheduledTaskNotifications, $.merge(["GetStatus"], $.makeArray(arguments)));
/// <summary>Calls the GetStatus method on the server-side scheduledTaskNotifications hub.&#10;Returns a jQuery.Deferred() promise.</summary>
return proxies['scheduledTaskNotifications'].invoke.apply(proxies['scheduledTaskNotifications'], $.merge(["GetStatus"], $.makeArray(arguments)));
}
};
proxies.userUpdates = this.createHubProxy('userUpdates');
proxies.userUpdates.client = { };
proxies.userUpdates.server = {
proxies['userUpdates'] = this.createHubProxy('userUpdates');
proxies['userUpdates'].client = { };
proxies['userUpdates'].server = {
};
return proxies;
@@ -1,7 +1,7 @@
/* jquery.signalR.core.js */
/*global window:false */
/*!
* ASP.NET SignalR JavaScript Library v2.0.3
* ASP.NET SignalR JavaScript Library v2.1.0
* http://signalr.net/
*
* Copyright (C) Microsoft Corporation. All rights reserved.
@@ -11,7 +11,6 @@
/// <reference path="Scripts/jquery-1.6.4.js" />
/// <reference path="jquery.signalR.version.js" />
(function ($, window, undefined) {
"use strict";
var resources = {
nojQuery: "jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.",
@@ -20,6 +19,10 @@
stoppedWhileLoading: "The connection was stopped during page load.",
stoppedWhileNegotiating: "The connection was stopped during the negotiate request.",
errorParsingNegotiateResponse: "Error parsing negotiate response.",
errorDuringStartRequest: "Error during start request. Stopping the connection.",
stoppedDuringStartRequest: "The connection was stopped during the start request.",
errorParsingStartResponse: "Error parsing start response: '{0}'. Stopping the connection.",
invalidStartResponse: "Invalid start response: '{0}'. Stopping the connection.",
protocolIncompatible: "You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.",
sendFailed: "Send failed.",
parseFailed: "Failed at parsing response: {0}",
@@ -32,7 +35,9 @@
pingServerFailedStatusCode: "Failed to ping server. Server responded with status code {0}, stopping the connection.",
pingServerFailedParse: "Failed to parse ping server response, stopping the connection.",
noConnectionTransport: "Connection is in an invalid state, there is no transport active.",
webSocketsInvalidState: "The Web Socket transport is in an invalid state, transitioning into reconnecting."
webSocketsInvalidState: "The Web Socket transport is in an invalid state, transitioning into reconnecting.",
reconnectTimeout: "Couldn't reconnect within the configured timeout of {0} ms, disconnecting.",
reconnectWindowTimeout: "The client has been inactive since {0} and it has exceeded the inactivity timeout of {1} ms. Stopping the connection."
};
if (typeof ($) !== "function") {
@@ -94,6 +99,11 @@
return connection.state === signalR.connectionState.disconnected;
},
supportsKeepAlive = function (connection) {
return connection._.keepAliveData.activated &&
connection.transport.supportsKeepAlive(connection);
},
configureStopReconnectingTimeout = function (connection) {
var stopReconnectingTimeout,
onReconnectTimeout;
@@ -102,7 +112,9 @@
// Without this check if a connection is stopped then started events will be bound multiple times.
if (!connection._.configuredStopReconnectingTimeout) {
onReconnectTimeout = function (connection) {
connection.log("Couldn't reconnect within the configured timeout (" + connection.disconnectTimeout + "ms), disconnecting.");
var message = signalR._.format(signalR.resources.reconnectTimeout, connection.disconnectTimeout);
connection.log(message);
$(connection).triggerHandler(events.onError, [signalR._.error(message, /* source */ "TimeoutException")]);
connection.stop(/* async */ false, /* notifyServer */ false);
};
@@ -322,6 +334,7 @@
this.url = url;
this.qs = qs;
this.lastError = null;
this._ = {
keepAliveData: {},
connectingMessageBuffer: new ConnectingMessageBuffer(this, function (message) {
@@ -351,6 +364,8 @@
}
},
_originalJson: window.JSON,
json: window.JSON,
isCrossDomain: function (url, against) {
@@ -386,7 +401,7 @@
state: signalR.connectionState.disconnected,
clientProtocol: "1.3",
clientProtocol: "1.4",
reconnectDelay: 2000,
@@ -413,6 +428,8 @@
deferred = connection._deferral || $.Deferred(), // Check to see if there is a pre-existing deferral that's being built on, if so we want to keep using it
parser = window.document.createElement("a");
connection.lastError = null;
// Persist the deferral so that if start is called multiple times the same deferral is used.
connection._deferral = deferred;
@@ -470,14 +487,14 @@
parser.href = connection.url;
if (!parser.protocol || parser.protocol === ":") {
connection.protocol = window.document.location.protocol;
connection.host = window.document.location.host;
connection.baseUrl = connection.protocol + "//" + connection.host;
connection.host = parser.host || window.document.location.host;
} else {
connection.protocol = parser.protocol;
connection.host = parser.host;
connection.baseUrl = parser.protocol + "//" + parser.host;
}
connection.baseUrl = connection.protocol + "//" + connection.host;
// Set the websocket protocol
connection.wsProtocol = connection.protocol === "https:" ? "wss://" : "ws://";
@@ -586,7 +603,7 @@
window.clearTimeout(connection._.onFailedTimeoutHandle);
if (transport.supportsKeepAlive && connection._.keepAliveData.activated) {
if (supportsKeepAlive(connection)) {
signalR.transports._logic.monitorKeepAlive(connection);
}
@@ -646,23 +663,11 @@
url = signalR.transports._logic.prepareQueryString(connection, url);
// Add the client version to the negotiate request. We utilize the same addQs method here
// so that it can append the clientVersion appropriately to the URL
url = signalR.transports._logic.addQs(url, {
clientProtocol: connection.clientProtocol
});
connection.log("Negotiating with '" + url + "'.");
// Save the ajax negotiate request object so we can abort it if stop is called while the request is in flight.
connection._.negotiateRequest = $.ajax(
$.extend({}, $.signalR.ajaxDefaults, {
xhrFields: { withCredentials: connection.withCredentials },
connection._.negotiateRequest = signalR.transports._logic.ajax(connection, {
url: url,
type: "GET",
contentType: connection.contentType,
data: {},
dataType: connection.ajaxDataType,
error: function (error, statusText) {
// We don't want to cause any errors if we're aborting our own negotiate request.
if (statusText !== _negotiateAbortText) {
@@ -691,6 +696,7 @@
connection.id = res.ConnectionId;
connection.token = res.ConnectionToken;
connection.webSocketServerUrl = res.WebSocketServerUrl;
connection._.longPollDelay = res.LongPollDelay * 1000; // in ms
// Once the server has labeled the PersistentConnection as Disconnected, we should stop attempting to reconnect
// after res.DisconnectTimeout seconds.
@@ -747,8 +753,7 @@
initialize(transports);
}
}
));
});
return deferred.promise();
},
@@ -813,6 +818,7 @@
/// <returns type="signalR" />
var connection = this;
$(connection).bind(events.onError, function (e, errorData, sendData) {
connection.lastError = errorData;
// In practice 'errorData' is the SignalR built error object.
// In practice 'sendData' is undefined for all error events except those triggered by
// 'ajaxSend' and 'webSockets.send'.'sendData' is the original send payload.
@@ -882,7 +888,6 @@
}
// Always clean up private non-timeout based state.
delete connection._deferral;
delete connection._.config;
delete connection._.deferredStartHandler;
@@ -920,7 +925,7 @@
connection.transport.abort(connection, async);
}
if (connection.transport.supportsKeepAlive && connection._.keepAliveData.activated) {
if (supportsKeepAlive(connection)) {
signalR.transports._logic.stopMonitoringKeepAlive(connection);
}
@@ -933,15 +938,20 @@
delete connection._.negotiateRequest;
}
// Ensure that tryAbortStartRequest is called before connection._deferral is deleted
signalR.transports._logic.tryAbortStartRequest(connection);
// Trigger the disconnect event
$(connection).triggerHandler(events.onDisconnect);
delete connection._deferral;
delete connection.messageId;
delete connection.groupsToken;
delete connection.id;
delete connection._.pingIntervalId;
delete connection._.lastMessageAt;
delete connection._.lastActiveAt;
delete connection._.longPollDelay;
// Clear out our message buffer
connection._.connectingMessageBuffer.clear();
@@ -979,11 +989,11 @@
/// <reference path="jquery.signalR.core.js" />
(function ($, window, undefined) {
"use strict";
var signalR = $.signalR,
events = $.signalR.events,
changeState = $.signalR.changeState,
startAbortText = "__Start Aborted__",
transportLogic;
signalR.transports = {};
@@ -1028,36 +1038,43 @@
}
}
function addConnectionData(url, connectionData) {
var appender = url.indexOf("?") !== -1 ? "&" : "?";
function getAjaxUrl(connection, path) {
var url = connection.url + path;
if (connectionData) {
url += appender + "connectionData=" + window.encodeURIComponent(connectionData);
if (connection.transport) {
url += "?transport=" + connection.transport.name;
}
return url;
return transportLogic.prepareQueryString(connection, url);
}
transportLogic = signalR.transports._logic = {
ajax: function (connection, options) {
return $.ajax(
$.extend(/*deep copy*/ true, {}, $.signalR.ajaxDefaults, {
type: "GET",
data: {},
xhrFields: { withCredentials: connection.withCredentials },
contentType: connection.contentType,
dataType: connection.ajaxDataType
}, options));
},
pingServer: function (connection) {
/// <summary>Pings the server</summary>
/// <param name="connection" type="signalr">Connection associated with the server ping</param>
/// <returns type="signalR" />
var url, deferral = $.Deferred(), xhr;
var url,
xhr,
deferral = $.Deferred();
if (connection.transport) {
url = connection.url + "/ping";
url = transportLogic.addQs(url, connection.qs);
xhr = $.ajax(
$.extend({}, $.signalR.ajaxDefaults, {
xhrFields: { withCredentials: connection.withCredentials },
xhr = transportLogic.ajax(connection, {
url: url,
type: "GET",
contentType: connection.contentType,
data: {},
dataType: connection.ajaxDataType,
success: function (result) {
var data;
@@ -1083,7 +1100,7 @@
else {
deferral.reject(
signalR._.transportError(
signalR._.format(signalR.resources.pingServerFailedInvalidResponse, result.responseText),
signalR._.format(signalR.resources.pingServerFailedInvalidResponse, result),
connection.transport,
null /* error */,
xhr
@@ -1114,9 +1131,7 @@
);
}
}
}
));
});
}
else {
deferral.reject(
@@ -1131,9 +1146,23 @@
},
prepareQueryString: function (connection, url) {
url = transportLogic.addQs(url, connection.qs);
var preparedUrl;
return addConnectionData(url, connection.data);
// Use addQs to start since it handles the ?/& prefix for us
preparedUrl = transportLogic.addQs(url, "clientProtocol=" + connection.clientProtocol);
// Add the user-specified query string params if any
preparedUrl = transportLogic.addQs(preparedUrl, connection.qs);
if (connection.token) {
preparedUrl += "&connectionToken=" + window.encodeURIComponent(connection.token);
}
if (connection.data) {
preparedUrl += "&connectionData=" + window.encodeURIComponent(connection.data);
}
return preparedUrl;
},
addQs: function (url, qs) {
@@ -1165,7 +1194,7 @@
/// <summary>Gets the url for making a GET based connect request</summary>
var baseUrl = transport === "webSockets" ? "" : connection.baseUrl,
url = baseUrl + connection.appRelativeUrl,
qs = "transport=" + transport + "&connectionToken=" + window.encodeURIComponent(connection.token);
qs = "transport=" + transport;
if (connection.groupsToken) {
qs += "&groupsToken=" + window.encodeURIComponent(connection.groupsToken);
@@ -1218,21 +1247,17 @@
ajaxSend: function (connection, data) {
var payload = transportLogic.stringifySend(connection, data),
url = connection.url + "/send" + "?transport=" + connection.transport.name + "&connectionToken=" + window.encodeURIComponent(connection.token),
url = getAjaxUrl(connection, "/send"),
xhr,
onFail = function (error, connection) {
$(connection).triggerHandler(events.onError, [signalR._.transportError(signalR.resources.sendFailed, connection.transport, error, xhr), data]);
};
url = transportLogic.prepareQueryString(connection, url);
xhr = $.ajax(
$.extend({}, $.signalR.ajaxDefaults, {
xhrFields: { withCredentials: connection.withCredentials },
xhr = transportLogic.ajax(connection, {
url: url,
type: connection.ajaxDataType === "jsonp" ? "GET" : "POST",
contentType: signalR._.defaultContentType,
dataType: connection.ajaxDataType,
data: {
data: payload
},
@@ -1262,8 +1287,7 @@
onFail(error, connection);
}
}
));
});
return xhr;
},
@@ -1276,28 +1300,81 @@
// Async by default unless explicitly overidden
async = typeof async === "undefined" ? true : async;
var url = connection.url + "/abort" + "?transport=" + connection.transport.name + "&connectionToken=" + window.encodeURIComponent(connection.token);
url = transportLogic.prepareQueryString(connection, url);
var url = getAjaxUrl(connection, "/abort");
$.ajax(
$.extend({}, $.signalR.ajaxDefaults, {
xhrFields: { withCredentials: connection.withCredentials },
transportLogic.ajax(connection, {
url: url,
async: async,
timeout: 1000,
type: "POST",
contentType: connection.contentType,
dataType: connection.ajaxDataType,
data: {}
}
));
type: "POST"
});
connection.log("Fired ajax abort async = " + async + ".");
},
tryInitialize: function (persistentResponse, onInitialized) {
tryInitialize: function (connection, persistentResponse, onInitialized) {
var startUrl,
xhr,
rejectDeferred = function (error) {
var deferred = connection._deferral;
if (deferred) {
deferred.reject(error);
}
},
triggerStartError = function (error) {
$(connection).triggerHandler(events.onError, [error]);
rejectDeferred(error);
connection.stop();
};
if (persistentResponse.Initialized) {
startUrl = getAjaxUrl(connection, "/start");
xhr = transportLogic.ajax(connection, {
url: startUrl,
success: function (result) {
var data;
try {
data = connection._parseResponse(result);
} catch (error) {
triggerStartError(signalR._.error(
signalR._.format(signalR.resources.errorParsingStartResponse, result),
error, xhr));
return;
}
if (data.Response === "started") {
onInitialized();
} else {
triggerStartError(signalR._.error(
signalR._.format(signalR.resources.invalidStartResponse, result),
null /* error */, xhr));
}
},
error: function (error, statusText) {
if (statusText !== startAbortText) {
triggerStartError(signalR._.error(
signalR.resources.errorDuringStartRequest,
error, xhr));
} else {
// Stop has been called
rejectDeferred(signalR._.error(
signalR.resources.stoppedDuringStartRequest,
null /* error */, xhr));
}
}
});
connection._.startRequest = xhr;
}
},
tryAbortStartRequest: function (connection) {
if (connection._.startRequest) {
// If the start request has already completed this will noop.
connection._.startRequest.abort(startAbortText);
delete connection._.startRequest;
}
},
@@ -1316,14 +1393,6 @@
if (minData) {
data = transportLogic.maximizePersistentResponse(minData);
if (data.Disconnect) {
connection.log("Disconnect command received from server.");
// Disconnected by the server
connection.stop(false, false);
return;
}
transportLogic.updateGroups(connection, data.GroupsToken);
if (data.MessageId) {
@@ -1335,7 +1404,7 @@
transportLogic.triggerReceived(connection, message);
});
transportLogic.tryInitialize(data, onInitialized);
transportLogic.tryInitialize(connection, data, onInitialized);
}
}
},
@@ -1422,8 +1491,10 @@
verifyLastActive: function (connection) {
if (new Date().getTime() - connection._.lastActiveAt >= connection.reconnectWindow) {
connection.log("There has not been an active server connection for an extended period of time. Stopping connection.");
connection.stop();
var message = signalR._.format(signalR.resources.reconnectWindowTimeout, new Date(connection._.lastActiveAt), connection.reconnectWindow);
connection.log(message);
$(connection).triggerHandler(events.onError, [signalR._.error(message, /* source */ "TimeoutException")]);
connection.stop(/* async */ false, /* notifyServer */ false);
return false;
}
@@ -1486,7 +1557,6 @@
/// <reference path="jquery.signalR.transports.common.js" />
(function ($, window, undefined) {
"use strict";
var signalR = $.signalR,
events = $.signalR.events,
@@ -1496,7 +1566,9 @@
signalR.transports.webSockets = {
name: "webSockets",
supportsKeepAlive: true,
supportsKeepAlive: function () {
return true;
},
send: function (connection, data) {
var payload = transportLogic.stringifySend(connection, data);
@@ -1638,17 +1710,22 @@
/// <reference path="jquery.signalR.transports.common.js" />
(function ($, window, undefined) {
"use strict";
var signalR = $.signalR,
events = $.signalR.events,
changeState = $.signalR.changeState,
transportLogic = signalR.transports._logic;
transportLogic = signalR.transports._logic,
clearReconnectAttemptTimeout = function (connection) {
window.clearTimeout(connection._.reconnectAttemptTimeoutHandle);
delete connection._.reconnectAttemptTimeoutHandle;
};
signalR.transports.serverSentEvents = {
name: "serverSentEvents",
supportsKeepAlive: true,
supportsKeepAlive: function () {
return true;
},
timeOut: 3000,
@@ -1657,8 +1734,7 @@
opened = false,
$connection = $(connection),
reconnecting = !onSuccess,
url,
reconnectTimeout;
url;
if (connection.eventSource) {
connection.log("The connection already has an event source. Stopping it.");
@@ -1695,7 +1771,7 @@
}
if (reconnecting) {
reconnectTimeout = window.setTimeout(function () {
connection._.reconnectAttemptTimeoutHandle = window.setTimeout(function () {
if (opened === false) {
// If we're reconnecting and the event source is attempting to connect,
// don't keep retrying. This causes duplicate connections to spawn.
@@ -1711,10 +1787,7 @@
connection.eventSource.addEventListener("open", function (e) {
connection.log("EventSource connected.");
if (reconnectTimeout) {
window.clearTimeout(reconnectTimeout);
}
clearReconnectAttemptTimeout(connection);
transportLogic.clearReconnectTimeout(connection);
if (opened === false) {
@@ -1794,6 +1867,7 @@
stop: function (connection) {
// Don't trigger a reconnect after stopping
clearReconnectAttemptTimeout(connection);
transportLogic.clearReconnectTimeout(connection);
if (connection && connection.eventSource) {
@@ -1817,7 +1891,6 @@
/// <reference path="jquery.signalR.transports.common.js" />
(function ($, window, undefined) {
"use strict";
var signalR = $.signalR,
events = $.signalR.events,
@@ -1872,7 +1945,9 @@
signalR.transports.foreverFrame = {
name: "foreverFrame",
supportsKeepAlive: true,
supportsKeepAlive: function () {
return true;
},
// Added as a value here so we can create tests to verify functionality
iframeClearThreshold: 50,
@@ -1962,9 +2037,21 @@
receive: function (connection, data) {
var cw,
body;
body,
response;
transportLogic.processMessages(connection, data, connection.onSuccess);
if (connection.json !== connection._originalJson) {
// If there's a custom JSON parser configured then serialize the object
// using the original (browser) JSON parser and then deserialize it using
// the custom parser (connection._parseResponse does that). This is so we
// can easily send the response from the server as "raw" JSON but still
// support custom JSON deserialization in the browser.
data = connection._originalJson.stringify(data);
}
response = connection._parseResponse(data);
transportLogic.processMessages(connection, response, connection.onSuccess);
// Protect against connection stopping from a callback trigger within the processMessages above.
if (connection.state === $.signalR.connectionState.connected) {
@@ -2048,18 +2135,33 @@
/// <reference path="jquery.signalR.transports.common.js" />
(function ($, window, undefined) {
"use strict";
var signalR = $.signalR,
events = $.signalR.events,
changeState = $.signalR.changeState,
isDisconnecting = $.signalR.isDisconnecting,
transportLogic = signalR.transports._logic;
transportLogic = signalR.transports._logic,
browserSupportsXHRProgress = (function () {
try {
return "onprogress" in new window.XMLHttpRequest();
} catch (e) {
// No XHR means no XHR progress event
return false;
}
})();
signalR.transports.longPolling = {
name: "longPolling",
supportsKeepAlive: false,
supportsKeepAlive: function (connection) {
return browserSupportsXHRProgress &&
connection.ajaxDataType !== "jsonp" &&
// Don't check for keep alives if there is a delay configured between poll requests.
// Don't check for keep alives if the server didn't send back the "LongPollDelay" as
// part of the response to /negotiate. That indicates the server is running an older
// version of SignalR that doesn't send long polling keep alives.
connection._.longPollDelay === 0;
},
reconnectDelay: 3000,
@@ -2070,10 +2172,11 @@
fireConnect = function () {
fireConnect = $.noop;
connection.log("LongPolling connected.");
onSuccess();
// Reset onFailed to null because it shouldn't be called again
onFailed = null;
connection.log("LongPolling connected.");
onSuccess();
},
tryFailConnect = function () {
if (onFailed) {
@@ -2125,13 +2228,13 @@
}
connection.log("Opening long polling request to '" + url + "'.");
instance.pollXhr = $.ajax(
$.extend({}, $.signalR.ajaxDefaults, {
xhrFields: { withCredentials: connection.withCredentials },
instance.pollXhr = transportLogic.ajax(connection, {
xhrFields: {
onprogress: function () {
transportLogic.markLastMessage(connection);
}
},
url: url,
type: "GET",
dataType: connection.ajaxDataType,
contentType: connection.contentType,
success: function (result) {
var minData,
delay = 0,
@@ -2145,6 +2248,7 @@
reconnectErrors = 0;
try {
// Remove any keep-alives from the beginning of the result
minData = connection._parseResponse(result);
}
catch (error) {
@@ -2239,9 +2343,7 @@
}, that.reconnectDelay);
}
}
}
));
});
// This will only ever pass after an error has occured via the poll ajax procedure.
if (reconnecting && raiseReconnect === true) {
@@ -2257,7 +2359,9 @@
},
lostConnection: function (connection) {
throw new Error("Lost Connection not handled for LongPolling");
if (connection.pollXhr) {
connection.pollXhr.abort("lostConnection");
}
},
send: function (connection, data) {
@@ -2294,7 +2398,6 @@
/// <reference path="jquery.signalR.core.js" />
(function ($, window, undefined) {
"use strict";
var eventNamespace = ".hubProxy",
signalR = $.signalR;
@@ -2457,7 +2560,15 @@
// Update the hub state
$.extend(that.state, result.State);
if (result.Error) {
if (result.Progress) {
if (d.notifyWith) {
// Progress is only supported in jQuery 1.7+
d.notifyWith(that, [result.Progress.Data]);
} else if(!connection._.progressjQueryVersionLogged) {
connection.log("A hub method invocation progress update was received but the version of jQuery in use (" + $.prototype.jquery + ") does not support progress updates. Upgrade to jQuery 1.7+ to receive progress notifications.");
connection._.progressjQueryVersionLogged = true;
}
} else if (result.Error) {
// Server hub method threw an exception, log it & reject the deferred
if (result.StackTrace) {
connection.log(result.Error + "\n" + result.StackTrace + ".");
@@ -2494,6 +2605,10 @@
return {
State: minHubResponse.S,
Result: minHubResponse.R,
Progress: minHubResponse.P ? {
Id: minHubResponse.P.I,
Data: minHubResponse.P.D
} : null,
Id: minHubResponse.I,
IsHubException: minHubResponse.H,
Error: minHubResponse.E,
@@ -2552,7 +2667,17 @@
return;
}
if (typeof (minData.I) !== "undefined") {
// We have to handle progress updates first in order to ensure old clients that receive
// progress updates enter the return value branch and then no-op when they can't find
// the callback in the map (because the minData.I value will not be a valid callback ID)
if (typeof (minData.P) !== "undefined") {
// Process progress notification
dataCallbackId = minData.P.I.toString();
callback = connection._.invocationCallbacks[dataCallbackId];
if (callback) {
callback.method.call(callback.scope, minData);
}
} else if (typeof (minData.I) !== "undefined") {
// We received the return value from a server method invocation, look up callback by id and call it
dataCallbackId = minData.I.toString();
callback = connection._.invocationCallbacks[dataCallbackId];
@@ -2689,5 +2814,5 @@
/*global window:false */
/// <reference path="jquery.signalR.core.js" />
(function ($, undefined) {
$.signalR.version = "2.0.3";
$.signalR.version = "2.1.0";
}(window.jQuery));
+7 -6
View File
@@ -46,12 +46,13 @@
<Reference Include="MarkdownSharp">
<HintPath>..\packages\MarkdownSharp.1.13.0.0\lib\35\MarkdownSharp.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.SignalR.Core, Version=2.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.AspNet.SignalR.Core, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.SignalR.Core.2.0.3\lib\net45\Microsoft.AspNet.SignalR.Core.dll</HintPath>
<HintPath>..\packages\Microsoft.AspNet.SignalR.Core.2.1.0\lib\net45\Microsoft.AspNet.SignalR.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.SignalR.SystemWeb">
<HintPath>..\packages\Microsoft.AspNet.SignalR.SystemWeb.2.0.3\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll</HintPath>
<Reference Include="Microsoft.AspNet.SignalR.SystemWeb, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.SignalR.SystemWeb.2.1.0\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Owin, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -2073,7 +2074,6 @@
<None Include="T4MVC.tt.settings.xml" />
<None Include="ClientSource\Scripts\Core\jquery.validate.js" />
<None Include="ClientSource\Scripts\Core\jquery.validate.unobtrusive.js" />
<None Include="ClientSource\Scripts\Modules\jQuery-SignalR\jquery.signalR-2.0.3.js" />
<None Include="ClientSource\Scripts\Modules\Knockout\knockout-3.1.0.js" />
<None Include="ClientSource\Scripts\Core\modernizr-2.7.2.js" />
<None Include="ClientSource\Scripts\Core\jquery-ui-1.10.4.js" />
@@ -2087,6 +2087,7 @@
<None Include="ClientSource\Scripts\Modules\tinymce\themes\modern\theme.min.js" />
<None Include="ClientSource\Scripts\Modules\tinymce\tinymce.js" />
<None Include="ClientSource\Scripts\Modules\tinymce\tinymce.min.js" />
<Content Include="ClientSource\Scripts\Modules\jQuery-SignalR\jquery.signalR-2.1.0.js" />
<Content Include="Web.config">
<SubType>Designer</SubType>
</Content>
@@ -2176,7 +2177,7 @@
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
<UserProperties BuildVersion_StartDate="2011/7/1" BuildVersion_BuildAction="Both" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2011/7/1" />
</VisualStudio>
</ProjectExtensions>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
+4 -4
View File
@@ -12,10 +12,10 @@
<package id="MarkdownSharp" version="1.13.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="4.0.30506.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="2.0.30506.0" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.Core" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.JS" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.SystemWeb" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.Core" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.JS" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.SystemWeb" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi" version="4.0.30506.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="4.0.30506.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="4.0.30506.0" targetFramework="net45" />
+6 -7
View File
@@ -21,7 +21,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{FE0E88
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject
Global
@@ -121,12 +120,12 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
BuildVersion_BuildAction = Both
BuildVersion_StartDate = 2001/1/1
BuildVersion_BuildVersioningStyle = None.None.None.None
BuildVersion_UpdateAssemblyVersion = False
BuildVersion_UpdateFileVersion = False
BuildVersion_DetectChanges = True
BuildVersion_UseGlobalSettings = False
BuildVersion_DetectChanges = True
BuildVersion_UpdateFileVersion = False
BuildVersion_UpdateAssemblyVersion = False
BuildVersion_BuildVersioningStyle = None.None.None.None
BuildVersion_StartDate = 2001/1/1
BuildVersion_BuildAction = Both
EndGlobalSection
EndGlobal