public override void HandleRequest(Session.Receive stream) { var request = stream.ReadUInt32(); var world = ChunkService.Worlds.Get(stream.ReadUInt32()); var ret = new Dictionary <string, string> { { "name", world.Name } }; Reply.Send(stream.Session, request, ret); }
public override void HandleRequest(Session.Receive request) { var session = request.ReadUInt32(); var ids = StaticChunkPool.Id; Reply.Send(request.Session, session, ids); }
private static Chunk RequestExtractChunkContent(Session.Receive request, Int3 chunkPos, World.World world) { var cow = request.ReadUInt32(); if (cow != uint.MaxValue) { return(new Chunk(chunkPos, world, cow)); } var data = GetCache(); request.Read(data, 0, data.Length); return(DeserializeChunk(chunkPos, world, data)); }
public override void HandleRequest(Session.Receive request) { var session = request.ReadUInt32(); Reply.Send(request.Session, session, new uint[] { 0 }); }