Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
9ee43e17
Commit
9ee43e17
authored
May 29, 2013
by
mcmlxxix
Browse files
added connection state getter (JSONClient.connected)
parent
97b35e04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
exec/load/json-client.js
exec/load/json-client.js
+5
-0
No files found.
exec/load/json-client.js
View file @
9ee43e17
...
...
@@ -87,6 +87,11 @@ function JSONClient(serverAddr,serverPort) {
this
.
callback
;
this
.
updates
=
[];
/* connection state */
this
.
__defineGetter__
(
"
connected
"
,
function
()
{
return
this
.
socket
.
is_connected
;
});
/* convert null values to undefined when parsing */
Socket
.
prototype
.
reviver
=
function
(
k
,
v
)
{
if
(
v
===
null
)
return
undefined
;
return
v
;
};
...
...
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