Files
GarageServer.IO/lib/server/garageserver.io.js
T
2013-05-11 17:07:36 -04:00

19 lines
452 B
JavaScript

function GarageServer (io) {
this.io = io;
}
GarageServer.prototype.PlayerConnect = function (callback) {
this.io.sockets.on('connection', function (socket) {
callback(socket);
});
};
GarageServer.prototype.PlayerDisconnect = function (callback) {
this.io.sockets.on('connection', function (socket) {
callback(socket);
});
};
exports.createGameServer = function (io, options){
return new GarageServer(io);
};