working towards usable new structure

This commit is contained in:
logsol 2012-07-22 17:54:27 +02:00
parent 3afc2fa66e
commit 815c63009f
15 changed files with 223 additions and 84 deletions

33
app/Bootstrap/Channel.js Executable file
View file

@ -0,0 +1,33 @@
define([
"Game/Server/Channel"
],
function(Channel) {
function ChannelBootstrap(process) {
var coordinatorLink = new CoordinatorLink(process);
var channel = null;
process.on('message', function(message) {
switch(message){
case 'CREATE':
channel = new Channel(coordinatorLink);
break;
case 'KILL':
channel.destroy();
process.exit(0);
break;
default:
coordinatorLink.receive(message);
break;
}
});
}
return ChannelBootstrap;
});