mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
nc refuckulating
This commit is contained in:
parent
28f71f49e1
commit
4f4bbf73e8
16 changed files with 142 additions and 58 deletions
|
|
@ -16,7 +16,7 @@ function (Parent, ProtocolHelper, Nc) {
|
|||
socketLink.on('message', this.onMessage.bind(this));
|
||||
socketLink.on('disconnect', this.onDisconnect.bind(this));
|
||||
|
||||
Nc.on("user/" + this.socketLink.id + "/message", this.socketLink.send, this.socketLink);
|
||||
Nc.on(Nc.ns.server.to.client.message.send + id, this.socketLink.send, this.socketLink);
|
||||
}
|
||||
|
||||
User.prototype = Object.create(Parent.prototype);
|
||||
|
|
@ -73,7 +73,7 @@ function (Parent, ProtocolHelper, Nc) {
|
|||
|
||||
User.prototype.onPing = function(timestamp) {
|
||||
var message = ProtocolHelper.encodeCommand("pong", timestamp);
|
||||
Nc.trigger("user/" + this.socketLink.id + "/message", message);
|
||||
Nc.trigger(Nc.ns.server.to.client.message.send + id, message);
|
||||
};
|
||||
|
||||
return User;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue