OpenSim.Region.CoreModules.World.Voxels.VoxelModule.HandleVoxelChunkReq C# (CSharp) Method

HandleVoxelChunkReq() private method

private HandleVoxelChunkReq ( string request, string path, string param, OpenSim.Framework.Servers.HttpServer.OSHttpRequest httpRequest, OpenSim.Framework.Servers.HttpServer.OSHttpResponse httpResponse ) : string
request string
path string
param string
httpRequest OpenSim.Framework.Servers.HttpServer.OSHttpRequest
httpResponse OpenSim.Framework.Servers.HttpServer.OSHttpResponse
return string
        string HandleVoxelChunkReq(string request, string path, string param,
                                      OSHttpRequest httpRequest, OSHttpResponse httpResponse)
        {
            // Try to parse the texture ID from the request URL
            NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query);
            int X, Y,Z=0;
            if (!int.TryParse(query.GetOne("x"), out X) ||
                !int.TryParse(query.GetOne("y"), out Y))
            {
                httpResponse.StatusCode = 404;
                httpResponse.Send();
                return null;
            }
            if (X < 0 ||
                X > m_scene.Voxels.Width / VoxelChannel.CHUNK_SIZE_X ||
                Y < 0 ||
                Y > m_scene.Voxels.Length / VoxelChannel.CHUNK_SIZE_Y ||
                Z < 0 ||
                Z > m_scene.Voxels.Height / VoxelChannel.CHUNK_SIZE_Z)
            {
                httpResponse.StatusCode = 404;
                httpResponse.Send();
                return null;
            }

            SendChunk(httpRequest, httpResponse, X, Y);

            httpResponse.Send();
            return null;
        }
        public void RegionLoaded(Scene scene)