Introduced preliminary support for asynchronous file read requests,

ReaderWriter::ReadResult now has a FILE_REQUEST enum.
  ReaderWriter::Options now has a s/getAsynchronousFileReadHint() parameter methods.

  libcurl based plugin now detects enabing of the AsynchronousFileReadHint, but
  as yet does not handle async requests - handling everything syncronously.
  
  DatabasePager now by default will enable AsynchronousFileReadHint for http
  based file requests
This commit is contained in:
Robert Osfield
2008-05-14 17:03:57 +00:00
parent d7c4e6f26e
commit 646fc43747
3 changed files with 53 additions and 9 deletions

View File

@@ -316,6 +316,11 @@ class ReaderWriterCURL : public osgDB::ReaderWriter
proxyAddress = std::string(proxyEnvAddress) + ":8080"; //Default
}
bool asyncFileRead = options ? options->getAsynchronousFileReadHint() : false;
osg::notify(osg::INFO)<<"AsynchronousFileReadHint= "<<asyncFileRead<<std::endl;
// if (asyncFileRead) return ReadResult::FILE_REQUESTED;
std::stringstream buffer;
ReadResult curlResult;