diff options
author | Christian Beier <dontmind@freeshell.org> | 2012-08-19 15:34:40 +0200 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2012-08-19 15:34:40 +0200 |
commit | 2b4f616d96f92dc6596f8f4836582048dd57a3a5 (patch) | |
tree | aeaac6647bb0320de605e40905702066144ce786 /webclients/novnc/include/websock.js | |
parent | 2fba1be4536511696a266fb504c60167d3015038 (diff) | |
download | libvncserver-2b4f616d96f92dc6596f8f4836582048dd57a3a5.zip libvncserver-2b4f616d96f92dc6596f8f4836582048dd57a3a5.tar.gz |
Update noVNC webclient.
Diffstat (limited to 'webclients/novnc/include/websock.js')
-rw-r--r-- | webclients/novnc/include/websock.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/webclients/novnc/include/websock.js b/webclients/novnc/include/websock.js index 33350df..20d51d6 100644 --- a/webclients/novnc/include/websock.js +++ b/webclients/novnc/include/websock.js @@ -1,6 +1,6 @@ /* * Websock: high-performance binary WebSockets - * Copyright (C) 2011 Joel Martin + * Copyright (C) 2012 Joel Martin * Licensed under LGPL-3 (see LICENSE.txt) * * Websock is similar to the standard WebSocket object but Websock @@ -20,6 +20,11 @@ // Load Flash WebSocket emulator if needed +// To force WebSocket emulator even when native WebSocket available +//window.WEB_SOCKET_FORCE_FLASH = true; +// To enable WebSocket emulator debug: +//window.WEB_SOCKET_DEBUG=1; + if (window.WebSocket && !window.WEB_SOCKET_FORCE_FLASH) { Websock_native = true; } else if (window.MozWebSocket && !window.WEB_SOCKET_FORCE_FLASH) { @@ -28,9 +33,6 @@ if (window.WebSocket && !window.WEB_SOCKET_FORCE_FLASH) { } else { /* no builtin WebSocket so load web_socket.js */ - // To enable debug: - // window.WEB_SOCKET_DEBUG=1; - Websock_native = false; (function () { function get_INCLUDE_URI() { @@ -280,6 +282,8 @@ function open(uri) { Util.Debug(">> WebSock.onopen"); if (websocket.protocol) { Util.Info("Server chose sub-protocol: " + websocket.protocol); + } else { + Util.Error("Server select no sub-protocol!: " + websocket.protocol); } eventHandlers.open(); Util.Debug("<< WebSock.onopen"); |