version 0.1.3, tructate sha512 to 256bits, retry peer cmd only 3 times, ping peer before cmd to find stucked sockets, ping with timeout and retry, separate wrapper_key and auth_key, changed sha1 to sha512, backward compatibility to sha1, reduce websocket bw usage on events, removed wrapper hash from wrapper iframe url
This commit is contained in:
parent
b37e309eda
commit
014a79912f
12 changed files with 102 additions and 54 deletions
|
@ -118,8 +118,8 @@ class Wrapper
|
|||
setSiteInfo: (site_info) ->
|
||||
if site_info.event? # If loading screen visible add event to it
|
||||
# File started downloading
|
||||
if site_info.event[0] == "file_added" and site_info.bad_files.length
|
||||
@loading.printLine("#{site_info.bad_files.length} files needs to be downloaded")
|
||||
if site_info.event[0] == "file_added" and site_info.bad_files
|
||||
@loading.printLine("#{site_info.bad_files} files needs to be downloaded")
|
||||
# File finished downloading
|
||||
else if site_info.event[0] == "file_done"
|
||||
@loading.printLine("#{site_info.event[1]} downloaded")
|
||||
|
@ -148,5 +148,5 @@ class Wrapper
|
|||
console.log "[Wrapper]", args...
|
||||
|
||||
|
||||
ws_url = "ws://#{window.location.hostname}:#{window.location.port}/Websocket?auth_key=#{window.auth_key}"
|
||||
ws_url = "ws://#{window.location.hostname}:#{window.location.port}/Websocket?wrapper_key=#{window.wrapper_key}"
|
||||
window.wrapper = new Wrapper(ws_url)
|
||||
|
|
|
@ -852,8 +852,8 @@ jQuery.extend( jQuery.easing,
|
|||
|
||||
Wrapper.prototype.setSiteInfo = function(site_info) {
|
||||
if (site_info.event != null) {
|
||||
if (site_info.event[0] === "file_added" && site_info.bad_files.length) {
|
||||
this.loading.printLine("" + site_info.bad_files.length + " files needs to be downloaded");
|
||||
if (site_info.event[0] === "file_added" && site_info.bad_files) {
|
||||
this.loading.printLine("" + site_info.bad_files + " files needs to be downloaded");
|
||||
} else if (site_info.event[0] === "file_done") {
|
||||
this.loading.printLine("" + site_info.event[1] + " downloaded");
|
||||
if (site_info.event[1] === window.inner_path) {
|
||||
|
@ -890,7 +890,7 @@ jQuery.extend( jQuery.easing,
|
|||
|
||||
})();
|
||||
|
||||
ws_url = "ws://" + window.location.hostname + ":" + window.location.port + "/Websocket?auth_key=" + window.auth_key;
|
||||
ws_url = "ws://" + window.location.hostname + ":" + window.location.port + "/Websocket?wrapper_key=" + window.wrapper_key;
|
||||
|
||||
window.wrapper = new Wrapper(ws_url);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue