Skip to content

Commit

Permalink
on reconnection try to rejoin to any previously joined rooms as well [#2
Browse files Browse the repository at this point in the history
]
  • Loading branch information
kataras committed Jun 26, 2019
1 parent 400d3d8 commit d339394
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 17 deletions.
11 changes: 7 additions & 4 deletions _examples/browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
However, `neffos.(min.)js` is a NPM package too so alternatively,
you can use it as dependency on your package.json and all nodejs-npm tooling become available:
see the "browserify" example for more-->
<script src="https://cdn.jsdelivr.net/npm/neffos.js@0.1.13/dist/neffos.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/neffos.js@latest/dist/neffos.min.js"></script>
<script>
// `neffos` global variable is available now.
var scheme = document.location.protocol == "https:" ? "wss" : "ws";
Expand Down Expand Up @@ -57,11 +57,14 @@
addMessage(msg.Body);
}
}
} /*, {
}, {
// if > 0 then on network failures it tries to reconnect every 5 seconds, defaults to 0 (disabled).
reconnect: 5000,
// custom headers:
headers: {
'X-Username': 'kataras',
// 'X-Username': 'kataras',
}
} // sets custom headers. */);
});

// You can either wait to conenct or just conn.connect("connect")
// and put the `handleNamespaceConnectedConn` inside `_OnNamespaceConnected` callback instead.
Expand Down
2 changes: 1 addition & 1 deletion _examples/browserify/bundle.js

Large diffs are not rendered by default.

21 changes: 17 additions & 4 deletions dist/neffos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/neffos.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit d339394

Please sign in to comment.