Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
039d8670
Commit
039d8670
authored
Jan 26, 2017
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add JSDoc comments to Streamer.{connect, reconnect}
parent
d39da102
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
streamer.js
src/sidebar/streamer.js
+21
-4
No files found.
src/sidebar/streamer.js
View file @
039d8670
...
...
@@ -187,21 +187,38 @@ function Streamer($rootScope, annotationMapper, annotationUI, auth,
});
};
var
connect
=
function
()
{
/**
* Connect to the Hypothesis real time update service.
*
* If the service has already connected this does nothing.
*
* @return {Promise} Promise which resolves once the WebSocket connection
* process has started.
*/
function
connect
()
{
if
(
socket
)
{
return
Promise
.
resolve
();
}
return
_connect
();
}
;
}
var
reconnect
=
function
()
{
/**
* Connect to the Hypothesis real time update service.
*
* If the service has already connected this closes the existing connection
* and reconnects.
*
* @return {Promise} Promise which resolves once the WebSocket connection
* process has started.
*/
function
reconnect
()
{
if
(
socket
)
{
socket
.
close
();
}
return
_connect
();
}
;
}
function
applyPendingUpdates
()
{
var
updates
=
Object
.
values
(
pendingUpdates
);
...
...
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