mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
added joints
This commit is contained in:
parent
fa110ff4a8
commit
764220675b
10 changed files with 111 additions and 24 deletions
|
|
@ -16,22 +16,15 @@ function (NotificationCenter, Channel) {
|
|||
|
||||
process.on('message', function (message, handle) {
|
||||
|
||||
for(var method in message.data) {
|
||||
switch(method) {
|
||||
case 'CREATE':
|
||||
self.channel = new Channel(this, message.data[method]);
|
||||
break;
|
||||
|
||||
case 'KILL':
|
||||
self.channel.destroy();
|
||||
process.exit(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
self.onMessage(message);
|
||||
break;
|
||||
}
|
||||
if(message.data.hasOwnProperty('CREATE')) {
|
||||
self.channel = new Channel(this, message.data['CREATE']);
|
||||
} else if (message.data.hasOwnProperty('KILL')) {
|
||||
self.channel.destroy();
|
||||
process.exit(0);
|
||||
} else {
|
||||
self.onMessage(message);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue