monkeeShark/src/web/app/common/scripts/messaging-stream.js
2017-06-09 01:03:54 +09:00

23 lines
321 B
JavaScript

'use strict';
import Stream from './stream';
/**
* Messaging stream connection
*/
class Connection extends Stream {
constructor(me, otherparty) {
super('messaging', {
i: me.token,
otherparty
});
this.on('_connected_', () => {
this.send({
i: me.token
});
});
}
}
export default Connection;