partially working autorevive

This commit is contained in:
Amish Shah
2015-12-06 19:30:32 +00:00
parent 41efef750f
commit d504406cfc
5 changed files with 81 additions and 17 deletions

View File

@@ -15,7 +15,7 @@ export default class Client extends EventEmitter {
this class is an interface for the internal
client.
*/
constructor(options) {
constructor(options = {}) {
super();
this.options = options || {};
this.options.compress = options.compress || true;
@@ -69,6 +69,15 @@ export default class Client extends EventEmitter {
return this.internal.logout()
.then(callback, errCB(callback));
}
// def destroy
destroy(callback = (/*err*/) => { }) {
this.internal.logout()
.then(() => {
this.internal.disconnected(true);
});
}
// def sendMessage
sendMessage(where, content, options = {}, callback = (/*e, m*/) => {}) {
if (typeof options === "function") {