private void ReceiveTextureFiles(ServiceReceiver <file_server.GetBinaryFileRequest, file_server.GetBinaryFileResponse> serviceReceiver, file_server.GetBinaryFileResponse serviceResponse)
 {
     WriteBinaryResponseToFile((string)serviceReceiver.HandlerParameter, serviceResponse.value);
     UpdateFileRequestStatus(serviceReceiver.ServiceParameter.name);
 }
        private void ReceiveResourceFile(ServiceReceiver <file_server.GetBinaryFileRequest, file_server.GetBinaryFileResponse> serviceReceiver, file_server.GetBinaryFileResponse serviceResponse)
        {
            byte[] fileContents    = serviceResponse.value;
            Uri    resourceFileUri = new Uri(serviceReceiver.ServiceParameter.name);

            if (IsColladaFile(resourceFileUri))
            {
                Thread importResourceFilesThread = new Thread(() => ImportColladaTextureFiles(resourceFileUri, System.Text.Encoding.UTF8.GetString(fileContents)));
                importResourceFilesThread.Start();
            }
            else
            {
                UpdateFileRequestStatus(resourceFileUri.ToString());
            }

            Thread writeTextFileThread = new Thread(() => WriteBinaryResponseToFile((string)serviceReceiver.HandlerParameter, fileContents));

            writeTextFileThread.Start();
        }