Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
bee36506
Commit
bee36506
authored
Jun 08, 2012
by
Joel Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix forcing of web-socket-js even when native available.
parent
cb3ad1b5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
web_socket.js
include/web-socket-js/web_socket.js
+1
-1
websock.js
include/websock.js
+7
-3
No files found.
include/web-socket-js/web_socket.js
View file @
bee36506
...
...
@@ -5,7 +5,7 @@
(
function
()
{
if
(
window
.
WebSocket
)
return
;
if
(
window
.
WebSocket
&&
!
window
.
WEB_SOCKET_FORCE_FLASH
)
return
;
var
console
=
window
.
console
;
if
(
!
console
||
!
console
.
log
||
!
console
.
error
)
{
...
...
include/websock.js
View file @
bee36506
...
...
@@ -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"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment