return new Promise(function(resolve, reject) {
//If socket connection already exists, eat the request.
if(state.socket) {
return new Promise(function(resolve, reject) {
//If socket connection already exists, eat the request.
if(state.socket) {
},
success: function(data, textStatus, jqXHR) {
Utils.checkAndResolveSocketRequest(data, resolve, reject);
},
success: function(data, textStatus, jqXHR) {
Utils.checkAndResolveSocketRequest(data, resolve, reject);