#61 chunkStore is getting filled/emptied on demand

This commit is contained in:
Danielv123 committed 2017-12-10 14:07:37 +01:00
1 parent b1f35c9b72
commit 8fce9a2cfe
6 files changed
+72 -62

No files matched your search

+10 -3
View File
@@ -610,13 +610,20 @@ server.listen(config.masterPort || 8080, function () {
/* Websockets for remoteMap */
var io = require("socket.io")(server);
var slaveMappers = {};
class slaveMapper {
constructor(instanceID, socket) {
this.instanceID = instanceID;
this.socket = socket;
}
getChunk(x,y){
}
}
io.on('connection', function (socket) {
socket.emit('hello', { hello: 'world' });
socket.on('registerSlaveMapper', function (data) {
console.log(data);
slaveMappers[data.instanceID].getChunk = function getChunk(x,y){
}
slaveMappers[data.instanceID] = new slaveMapper(data.instanceID, socket);
});
});