mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 15:33:12 +09:00
#61 chunkStore is getting filled/emptied on demand
This commit is contained in:
1 parent
b1f35c9b72
commit
8fce9a2cfe
6 files changed
+72
-62
No files matched your search
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user