maintenance: dependency updates
This commit is contained in:
1 parent
99be87ed9c
commit
fcf70f724e
22 files changed
+227
-100
No files matched your search
@@ -1,14 +1,15 @@
|
||||
/* jquery.signalR.core.js */
|
||||
/*global window:false */
|
||||
/*!
|
||||
* ASP.NET SignalR JavaScript Library v2.1.1
|
||||
* ASP.NET SignalR JavaScript Library v2.1.2
|
||||
* http://signalr.net/
|
||||
*
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
/// <reference path="../Core/jquery-2.1.1.js" />
|
||||
/// <reference path="Scripts/jquery-1.6.4.js" />
|
||||
/// <reference path="jquery.signalR.version.js" />
|
||||
(function ($, window, undefined) {
|
||||
|
||||
var resources = {
|
||||
@@ -704,7 +705,9 @@
|
||||
connection.id = res.ConnectionId;
|
||||
connection.token = res.ConnectionToken;
|
||||
connection.webSocketServerUrl = res.WebSocketServerUrl;
|
||||
connection._.longPollDelay = res.LongPollDelay * 1000; // in ms
|
||||
|
||||
// The long poll timeout is the ConnectionTimeout plus 10 seconds
|
||||
connection._.pollTimeout = res.ConnectionTimeout * 1000 + 10000; // in ms
|
||||
|
||||
// Once the server has labeled the PersistentConnection as Disconnected, we should stop attempting to reconnect
|
||||
// after res.DisconnectTimeout seconds.
|
||||
@@ -959,7 +962,6 @@
|
||||
delete connection._.pingIntervalId;
|
||||
delete connection._.lastMessageAt;
|
||||
delete connection._.lastActiveAt;
|
||||
delete connection._.longPollDelay;
|
||||
|
||||
// Clear out our message buffer
|
||||
connection._.connectingMessageBuffer.clear();
|
||||
@@ -1317,7 +1319,7 @@
|
||||
type: "POST"
|
||||
});
|
||||
|
||||
connection.log("Fired ajax abort async = " + async + ".");
|
||||
connection.log("Fired ajax abort async = " + doAsync + ".");
|
||||
},
|
||||
|
||||
ajaxStart: function (connection, onSuccess) {
|
||||
@@ -2149,27 +2151,13 @@
|
||||
events = $.signalR.events,
|
||||
changeState = $.signalR.changeState,
|
||||
isDisconnecting = $.signalR.isDisconnecting,
|
||||
transportLogic = signalR.transports._logic,
|
||||
browserSupportsXHRProgress = (function () {
|
||||
try {
|
||||
return "onprogress" in new window.XMLHttpRequest();
|
||||
} catch (e) {
|
||||
// No XHR means no XHR progress event
|
||||
return false;
|
||||
}
|
||||
})();
|
||||
transportLogic = signalR.transports._logic;
|
||||
|
||||
signalR.transports.longPolling = {
|
||||
name: "longPolling",
|
||||
|
||||
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;
|
||||
supportsKeepAlive: function () {
|
||||
return false;
|
||||
},
|
||||
|
||||
reconnectDelay: 3000,
|
||||
@@ -2244,6 +2232,7 @@
|
||||
}
|
||||
},
|
||||
url: url,
|
||||
timeout: connection._.pollTimeout,
|
||||
success: function (result) {
|
||||
var minData,
|
||||
delay = 0,
|
||||
@@ -2486,6 +2475,8 @@
|
||||
};
|
||||
},
|
||||
|
||||
constructor: hubProxy,
|
||||
|
||||
hasSubscriptions: function () {
|
||||
return hasMembers(this._.callbackMap);
|
||||
},
|
||||
@@ -2823,7 +2814,7 @@
|
||||
/*global window:false */
|
||||
/// <reference path="jquery.signalR.core.js" />
|
||||
(function ($, undefined) {
|
||||
$.signalR.version = "2.1.1";
|
||||
$.signalR.version = "2.1.2";
|
||||
}(window.jQuery));
|
||||
|
||||
/*!
|
||||
@@ -2836,8 +2827,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/// <reference path="..\..\SignalR.Client.JS\Scripts\jquery-1.6.4.js" />
|
||||
/// <reference path="jquery.signalR.js" />
|
||||
/// <reference path="..\..\Core\jquery-2.1.1.js" />
|
||||
/// <reference path="jquery.signalR-2.1.1.js" />
|
||||
(function ($, window, undefined) {
|
||||
/// <param name="$" type="jQuery" />
|
||||
"use strict";
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*!
|
||||
* ASP.NET SignalR JavaScript Library v2.1.1
|
||||
* ASP.NET SignalR JavaScript Library v2.1.2
|
||||
* http://signalr.net/
|
||||
*
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*
|
||||
*/
|
||||
(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.onErrLine 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.onErrLine truncated
|
||||
/*!
|
||||
* ASP.NET SignalR JavaScript Library v2.1.1
|
||||
* http://signalr.net/
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
/*!
|
||||
* ASP.NET SignalR JavaScript Library v2.1.1
|
||||
* http://signalr.net/
|
||||
*
|
||||
* Copyright Microsoft Open Technologies, Inc. All rights reserved.
|
||||
* Licensed under the Apache 2.0
|
||||
* https://github.com/SignalR/SignalR/blob/master/LICENSE.md
|
||||
*
|
||||
*/
|
||||
|
||||
/// <reference path="..\..\Core\jquery-2.1.1.js" />
|
||||
"use strict";
|
||||
|
||||
(function ($, window, undefined) {
|
||||
/// <param name="$" type="jQuery" />
|
||||
"use strict";
|
||||
|
||||
if (typeof $.signalR !== "function") {
|
||||
throw new Error("SignalR: SignalR is not loaded. Please ensure jquery.signalR-x.js is referenced before ~/signalr/js.");
|
||||
}
|
||||
|
||||
var signalR = $.signalR;
|
||||
|
||||
function makeProxyCallback(hub, callback) {
|
||||
return function () {
|
||||
// Call the client hub method
|
||||
callback.apply(hub, $.makeArray(arguments));
|
||||
};
|
||||
}
|
||||
|
||||
function registerHubProxies(instance, shouldSubscribe) {
|
||||
var key, hub, memberKey, memberValue, subscriptionMethod;
|
||||
|
||||
for (key in instance) {
|
||||
if (instance.hasOwnProperty(key)) {
|
||||
hub = instance[key];
|
||||
|
||||
if (!hub.hubName) {
|
||||
// Not a client hub
|
||||
continue;
|
||||
}
|
||||
|
||||
if (shouldSubscribe) {
|
||||
// We want to subscribe to the hub events
|
||||
subscriptionMethod = hub.on;
|
||||
} else {
|
||||
// We want to unsubscribe from the hub events
|
||||
subscriptionMethod = hub.off;
|
||||
}
|
||||
|
||||
// Loop through all members on the hub and find client hub functions to subscribe/unsubscribe
|
||||
for (memberKey in hub.client) {
|
||||
if (hub.client.hasOwnProperty(memberKey)) {
|
||||
memberValue = hub.client[memberKey];
|
||||
|
||||
if (!$.isFunction(memberValue)) {
|
||||
// Not a client hub function
|
||||
continue;
|
||||
}
|
||||
|
||||
subscriptionMethod.call(hub, memberKey, makeProxyCallback(hub, memberValue));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$.hubConnection.prototype.createHubProxies = function () {
|
||||
var proxies = {};
|
||||
this.starting(function () {
|
||||
// Register the hub proxies as subscribed
|
||||
// (instance, shouldSubscribe)
|
||||
registerHubProxies(proxies, true);
|
||||
|
||||
this._registerSubscribedHubs();
|
||||
}).disconnected(function () {
|
||||
// Unsubscribe all hub proxies when we "disconnect". This is to ensure that we do not re-add functional call backs.
|
||||
// (instance, shouldSubscribe)
|
||||
registerHubProxies(proxies, false);
|
||||
});
|
||||
|
||||
proxies['deviceBatchUpdates'] = this.createHubProxy('deviceBatchUpdates');
|
||||
proxies['deviceBatchUpdates'].client = {};
|
||||
proxies['deviceBatchUpdates'].server = {};
|
||||
|
||||
proxies['deviceUpdates'] = this.createHubProxy('deviceUpdates');
|
||||
proxies['deviceUpdates'].client = {};
|
||||
proxies['deviceUpdates'].server = {};
|
||||
|
||||
proxies['jobUpdates'] = this.createHubProxy('jobUpdates');
|
||||
proxies['jobUpdates'].client = {};
|
||||
proxies['jobUpdates'].server = {};
|
||||
|
||||
proxies['logNotifications'] = this.createHubProxy('logNotifications');
|
||||
proxies['logNotifications'].client = {};
|
||||
proxies['logNotifications'].server = {};
|
||||
|
||||
proxies['noticeboardUpdates'] = this.createHubProxy('noticeboardUpdates');
|
||||
proxies['noticeboardUpdates'].client = {};
|
||||
proxies['noticeboardUpdates'].server = {};
|
||||
|
||||
proxies['scheduledTaskNotifications'] = this.createHubProxy('scheduledTaskNotifications');
|
||||
proxies['scheduledTaskNotifications'].client = {};
|
||||
proxies['scheduledTaskNotifications'].server = {
|
||||
getStatus: function getStatus() {
|
||||
/// <summary>Calls the GetStatus method on the server-side scheduledTaskNotifications hub. 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 = {};
|
||||
|
||||
return proxies;
|
||||
};
|
||||
|
||||
signalR.hub = $.hubConnection("/API/Signalling", { useDefaultPath: false });
|
||||
$.extend(signalR, signalR.hub.createHubProxies());
|
||||
})(window.jQuery, window);
|
||||
/// <reference path="jquery.signalR-2.1.1.js" />
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/*!
|
||||
* ASP.NET SignalR JavaScript Library v2.1.1
|
||||
* http://signalr.net/
|
||||
*
|
||||
* Copyright Microsoft Open Technologies, Inc. All rights reserved.
|
||||
* Licensed under the Apache 2.0
|
||||
* https://github.com/SignalR/SignalR/blob/master/LICENSE.md
|
||||
*
|
||||
*/
|
||||
(function(n){"use strict";function r(t,i){return function(){i.apply(t,n.makeArray(arguments))}}function i(t,i){var e,u,f,o,s;for(e in t)if(t.hasOwnProperty(e)){if(u=t[e],!u.hubName)continue;s=i?u.on:u.off;for(f in u.client)if(u.client.hasOwnProperty(f)){if(o=u.client[f],!n.isFunction(o))continue;s.call(u,f,r(u,o))}}}if(typeof n.signalR!="function")throw new Error("SignalR: SignalR is not loaded. Please ensure jquery.signalR-x.js is referenced before ~/signalr/js.");var t=n.signalR;n.hubConnection.prototype.createHubProxies=function(){var t={};return this.starting(function(){i(t,!0);this._registerSubscribedHubs()}).disconnected(function(){i(t,!1)}),t.deviceBatchUpdates=this.createHubProxy("deviceBatchUpdates"),t.deviceBatchUpdates.client={},t.deviceBatchUpdates.server={},t.deviceUpdates=this.createHubProxy("deviceUpdates"),t.deviceUpdates.client={},t.deviceUpdates.server={},t.jobUpdates=this.createHubProxy("jobUpdates"),t.jobUpdates.client={},t.jobUpdates.server={},t.logNotifications=this.createHubProxy("logNotifications"),t.logNotifications.client={},t.logNotifications.server={},t.noticeboardUpdates=this.createHubProxy("noticeboardUpdates"),t.noticeboardUpdates.client={},t.noticeboardUpdates.server={},t.scheduledTaskNotifications=this.createHubProxy("scheduledTaskNotifications"),t.scheduledTaskNotifications.client={},t.scheduledTaskNotifications.server={getStatus:function(){return t.scheduledTaskNotifications.invoke.apply(t.scheduledTaskNotifications,n.merge(["GetStatus"],n.makeArray(arguments)))}},t.userUpdates=this.createHubProxy("userUpdates"),t.userUpdates.client={},t.userUpdates.server={},t};t.hub=n.hubConnection("/API/Signalling",{useDefaultPath:!1});n.extend(t,t.hub.createHubProxies())})(window.jQuery,window);
|
||||
+14
-23
@@ -1,14 +1,15 @@
|
||||
/* jquery.signalR.core.js */
|
||||
/*global window:false */
|
||||
/*!
|
||||
* ASP.NET SignalR JavaScript Library v2.1.1
|
||||
* ASP.NET SignalR JavaScript Library v2.1.2
|
||||
* http://signalr.net/
|
||||
*
|
||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
/// <reference path="../../Core/jquery-2.1.1.js" />
|
||||
/// <reference path="Scripts/jquery-1.6.4.js" />
|
||||
/// <reference path="jquery.signalR.version.js" />
|
||||
(function ($, window, undefined) {
|
||||
|
||||
var resources = {
|
||||
@@ -704,7 +705,9 @@
|
||||
connection.id = res.ConnectionId;
|
||||
connection.token = res.ConnectionToken;
|
||||
connection.webSocketServerUrl = res.WebSocketServerUrl;
|
||||
connection._.longPollDelay = res.LongPollDelay * 1000; // in ms
|
||||
|
||||
// The long poll timeout is the ConnectionTimeout plus 10 seconds
|
||||
connection._.pollTimeout = res.ConnectionTimeout * 1000 + 10000; // in ms
|
||||
|
||||
// Once the server has labeled the PersistentConnection as Disconnected, we should stop attempting to reconnect
|
||||
// after res.DisconnectTimeout seconds.
|
||||
@@ -959,7 +962,6 @@
|
||||
delete connection._.pingIntervalId;
|
||||
delete connection._.lastMessageAt;
|
||||
delete connection._.lastActiveAt;
|
||||
delete connection._.longPollDelay;
|
||||
|
||||
// Clear out our message buffer
|
||||
connection._.connectingMessageBuffer.clear();
|
||||
@@ -1317,7 +1319,7 @@
|
||||
type: "POST"
|
||||
});
|
||||
|
||||
connection.log("Fired ajax abort async = " + async + ".");
|
||||
connection.log("Fired ajax abort async = " + doAsync + ".");
|
||||
},
|
||||
|
||||
ajaxStart: function (connection, onSuccess) {
|
||||
@@ -2149,27 +2151,13 @@
|
||||
events = $.signalR.events,
|
||||
changeState = $.signalR.changeState,
|
||||
isDisconnecting = $.signalR.isDisconnecting,
|
||||
transportLogic = signalR.transports._logic,
|
||||
browserSupportsXHRProgress = (function () {
|
||||
try {
|
||||
return "onprogress" in new window.XMLHttpRequest();
|
||||
} catch (e) {
|
||||
// No XHR means no XHR progress event
|
||||
return false;
|
||||
}
|
||||
})();
|
||||
transportLogic = signalR.transports._logic;
|
||||
|
||||
signalR.transports.longPolling = {
|
||||
name: "longPolling",
|
||||
|
||||
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;
|
||||
supportsKeepAlive: function () {
|
||||
return false;
|
||||
},
|
||||
|
||||
reconnectDelay: 3000,
|
||||
@@ -2244,6 +2232,7 @@
|
||||
}
|
||||
},
|
||||
url: url,
|
||||
timeout: connection._.pollTimeout,
|
||||
success: function (result) {
|
||||
var minData,
|
||||
delay = 0,
|
||||
@@ -2486,6 +2475,8 @@
|
||||
};
|
||||
},
|
||||
|
||||
constructor: hubProxy,
|
||||
|
||||
hasSubscriptions: function () {
|
||||
return hasMembers(this._.callbackMap);
|
||||
},
|
||||
@@ -2823,5 +2814,5 @@
|
||||
/*global window:false */
|
||||
/// <reference path="jquery.signalR.core.js" />
|
||||
(function ($, undefined) {
|
||||
$.signalR.version = "2.1.1";
|
||||
$.signalR.version = "2.1.2";
|
||||
}(window.jQuery));
|
||||
Reference in new issue
Block a user