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
2ddd6214
Commit
2ddd6214
authored
Jun 24, 2010
by
Joel Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add web-socket-js debug flag and default to off.
parent
76053e2b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
WebSocketMain.as
include/web-socket-js/flash-src/WebSocketMain.as
+8
-1
web_socket.js
include/web-socket-js/web_socket.js
+4
-1
No files found.
include/web-socket-js/flash-src/WebSocketMain.as
View file @
2ddd6214
...
@@ -21,6 +21,7 @@ public class WebSocketMain extends Sprite {
...
@@ -21,6 +21,7 @@ public class WebSocketMain extends Sprite {
private
var
policyLoaded
:
Boolean
=
false
;
private
var
policyLoaded
:
Boolean
=
false
;
private
var
callerUrl
:
String
;
private
var
callerUrl
:
String
;
private
var
debug
:
Boolean
=
false
;
public
function
WebSocketMain
()
{
public
function
WebSocketMain
()
{
...
@@ -42,6 +43,10 @@ public class WebSocketMain extends Sprite {
...
@@ -42,6 +43,10 @@ public class WebSocketMain extends Sprite {
callerUrl
=
url
;
callerUrl
=
url
;
}
}
public
function
setDebug
(
val
:
Boolean
)
:
void
{
debug
=
val
;
}
public
function
create
(
public
function
create
(
url
:
String
,
protocol
:
String
,
url
:
String
,
protocol
:
String
,
proxyHost
:
String
=
null
,
proxyPort
:
int
=
0
,
proxyHost
:
String
=
null
,
proxyPort
:
int
=
0
,
...
@@ -70,8 +75,10 @@ public class WebSocketMain extends Sprite {
...
@@ -70,8 +75,10 @@ public class WebSocketMain extends Sprite {
}
}
public
function
log
(
message
:
String
)
:
void
{
public
function
log
(
message
:
String
)
:
void
{
if
(
debug
)
{
ExternalInterface
.
call
(
"webSocketLog"
,
encodeURIComponent
(
"[WebSocket] "
+
message
))
;
ExternalInterface
.
call
(
"webSocketLog"
,
encodeURIComponent
(
"[WebSocket] "
+
message
))
;
}
}
}
public
function
error
(
message
:
String
)
:
void
{
public
function
error
(
message
:
String
)
:
void
{
ExternalInterface
.
call
(
"webSocketError"
,
encodeURIComponent
(
"[WebSocket] "
+
message
))
;
ExternalInterface
.
call
(
"webSocketError"
,
encodeURIComponent
(
"[WebSocket] "
+
message
))
;
...
...
include/web-socket-js/web_socket.js
View file @
2ddd6214
...
@@ -255,7 +255,7 @@
...
@@ -255,7 +255,7 @@
WebSocket
.
__tasks
=
[];
WebSocket
.
__tasks
=
[];
WebSocket
.
__initialize
=
function
()
{
WebSocket
.
__initialize
=
function
(
debug
)
{
if
(
!
WebSocket
.
__swfLocation
)
{
if
(
!
WebSocket
.
__swfLocation
)
{
console
.
error
(
"[WebSocket] set WebSocket.__swfLocation to location of WebSocketMain.swf"
);
console
.
error
(
"[WebSocket] set WebSocket.__swfLocation to location of WebSocketMain.swf"
);
return
;
return
;
...
@@ -283,6 +283,9 @@
...
@@ -283,6 +283,9 @@
//console.log("[WebSocket] FABridge initializad");
//console.log("[WebSocket] FABridge initializad");
WebSocket
.
__flash
=
FABridge
.
webSocket
.
root
();
WebSocket
.
__flash
=
FABridge
.
webSocket
.
root
();
WebSocket
.
__flash
.
setCallerUrl
(
location
.
href
);
WebSocket
.
__flash
.
setCallerUrl
(
location
.
href
);
if
(
typeof
debug
!==
"undefined"
)
{
WebSocket
.
__flash
.
setDebug
(
debug
);
}
for
(
var
i
=
0
;
i
<
WebSocket
.
__tasks
.
length
;
++
i
)
{
for
(
var
i
=
0
;
i
<
WebSocket
.
__tasks
.
length
;
++
i
)
{
WebSocket
.
__tasks
[
i
]();
WebSocket
.
__tasks
[
i
]();
}
}
...
...
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