22 #if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_DOWNLOADER) 23 #error Buildsystem error: BUILDING_PANDA_DOWNLOADER not defined 26 ConfigureDef(config_downloader);
27 NotifyCategoryDef(downloader,
"");
30 (
"downloader-byte-rate", 500000,
31 PRC_DESC(
"Specifies the default max bytes per second of throughput that is " 32 "supported by any HTTP connections with download-throttle enabled. " 33 "This may also be set on a per-channel basis with " 34 "HTTPChannel::set_max_bytes_per_second(). It has no effect unless " 35 "download-throttle (or HTTPChannel::set_download_throttle) is true."));
38 (
"download-throttle",
false,
39 PRC_DESC(
"When this is true, all HTTP channels will be bandwidth-limited " 40 "so as not to consume more than downloader-byte-rate bytes per " 44 (
"downloader-frequency", 0.2,
45 PRC_DESC(
"Frequency of download chunk requests in seconds (or fractions of) " 46 "(Estimated 200 msec round-trip to server)."));
49 (
"downloader-timeout", 15);
52 (
"downloader-timeout-retries", 5);
55 (
"decompressor-step-time", 0.005,
56 PRC_DESC(
"Specifies the maximum amount of time that should be consumed by " 57 "a single call to Decompressor::run()."));
60 (
"extractor-step-time", 0.005,
61 PRC_DESC(
"Specifies the maximum amount of time that should be consumed by " 62 "a single call to Extractor::step()."));
65 (
"patcher-buffer-size", 16384,
66 PRC_DESC(
"Limits the size of the buffer used in a single call to " 67 "Patcher::run(). Increasing this may help the Patcher " 68 "perform more work before returning."));
71 (
"http-proxy-tunnel",
false,
72 PRC_DESC(
"This specifies the default value for HTTPChannel::set_proxy_tunnel(). " 73 "If this is true, we will tunnel through a proxy for all connections, " 74 "instead of asking the proxy to serve documents normally."));
77 (
"http-connect-timeout", 10.0,
78 PRC_DESC(
"This is the default amount of time to wait for a TCP/IP connection " 79 "to be established, in seconds."));
82 (
"http-timeout", 20.0,
83 PRC_DESC(
"This is the default amount of time to wait for the HTTP server (or " 84 "proxy) to finish sending its response to our request, in seconds. " 85 "It starts counting after the TCP connection has been established " 86 "(http_connect_timeout, above) and the request has been sent."));
89 (
"http-skip-body-size", 8192,
90 PRC_DESC(
"This is the maximum number of bytes in a received " 91 "(but unwanted) body that will be skipped past, in " 92 "order to reset to a new request. " 93 "See HTTPChannel::set_skip_body_size()."));
96 (
"http-idle-timeout", 5.0,
97 PRC_DESC(
"This the amount of time, in seconds, in which a " 98 "previously-established connection is allowed to remain open " 99 "and unused. If a previous connection has remained unused for " 100 "at least this number of seconds, it will be closed and a new " 101 "connection will be opened; otherwise, the same connection " 102 "will be reused for the next request (for a particular " 106 (
"http-max-connect-count", 10,
107 PRC_DESC(
"This is the maximum number of times to try reconnecting to the " 108 "server on any one document attempt. This is just a failsafe to " 109 "prevent the code from attempting runaway connections; this limit " 110 "should never be reached in practice."));
113 (
"tcp-header-size", 2,
114 PRC_DESC(
"Specifies the number of bytes to use to specify the datagram " 115 "length when writing a datagram on a TCP stream. This may be " 116 "0, 2, or 4. The server and client must agree on this value."));
119 (
"support-ipv6",
true,
120 PRC_DESC(
"Specifies whether IPv6 support should be enabled. This should " 121 "be true unless you are experiencing issues with Panda's IPv6 " 122 "support or are using a misconfigured system."));
124 ConfigureFn(config_downloader) {
136 static bool initialized =
false;
143 HTTPChannel::init_type();
144 VirtualFileHTTP::init_type();
145 VirtualFileMountHTTP::init_type();
147 VirtualFileMountHTTP::reload_vfs_mount_url();
152 (
"early-random-seed",
false,
153 PRC_DESC(
"Configure this true to compute the SSL random seed " 154 "early on in the application (specifically, when the libpandaexpress " 155 "library is loaded), or false to defer this until it is actually " 156 "needed (which will be the first time you open an https connection " 157 "or otherwise use encryption services). You can also call " 158 "HTTPClient::init_random_seed() to " 159 "do this when you are ready. The issue is that on Windows, " 160 "OpenSSL will attempt to " 161 "randomize its seed by crawling through the entire heap of " 162 "allocated memory, which can be extremely large in a Panda " 163 "application, especially if you have already opened a window and " 164 "started rendering; and so this can take as much as 30 seconds " 165 "or more. For this reason it is best to initialize the random " 166 "seed at startup, when the application is still very small."));
167 if (early_random_seed) {
168 HTTPClient::init_random_seed();
173 #endif // HAVE_OPENSSL PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static PandaSystem * get_global_ptr()
Returns the global PandaSystem object.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class is used as a namespace to group several global properties of Panda.
This is a convenience class to specialize ConfigVariable as a boolean type.
void init_libdownloader()
Initializes the library.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as a floating- point type.
void add_system(const std::string &system)
Intended for use by each subsystem to register itself at startup.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as an integer type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.