mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
messed everything up .... :( 111
This commit is contained in:
parent
03678eb773
commit
ec1bceb1b6
13 changed files with 145 additions and 117 deletions
|
|
@ -1,34 +0,0 @@
|
|||
define([
|
||||
"Game/Server/Channel",
|
||||
"Game/Server/CoordinatorLink"
|
||||
],
|
||||
|
||||
function (Channel, CoordinatorLink) {
|
||||
|
||||
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;
|
||||
|
||||
});
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
define([
|
||||
"Game/Client/Networker",
|
||||
"Lib/Vendor/SocketIO"
|
||||
],
|
||||
|
||||
function (Networker, SocketIO) {
|
||||
|
||||
function Client (location, options) {
|
||||
this.socket = SocketIO.connect(location, options);
|
||||
this.networker = new Networker(this.socket);
|
||||
}
|
||||
|
||||
return Client;
|
||||
|
||||
});
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
define([
|
||||
"Bootstrap/HttpServer",
|
||||
"Bootstrap/Socket",
|
||||
"Lobby/Coordinator"
|
||||
],
|
||||
|
||||
function (HttpServer, Socket, Coordinator) {
|
||||
|
||||
function Server (options) {
|
||||
coordinator = new Coordinator();
|
||||
httpServer = new HttpServer(options);
|
||||
this.socket = new Socket(httpServer.getServer(), options, coordinator);
|
||||
}
|
||||
|
||||
return Server;
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue