Buckets:
| // | |
| // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2026 | |
| // | |
| // Distributed under the Boost Software License, Version 1.0. (See accompanying | |
| // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
| // | |
| int main(int argc, char *argv[]) { | |
| SET_VERBOSITY_LEVEL(VERBOSITY_NAME(DEBUG)); | |
| td::VERBOSITY_NAME(fd) = VERBOSITY_NAME(INFO); | |
| td::string url = (argc > 1 ? argv[1] : "https://telegram.org"); | |
| auto timeout = 10; | |
| auto ttl = 3; | |
| auto prefer_ipv6 = (argc > 2 && td::string(argv[2]) == "-6"); | |
| auto scheduler = td::make_unique<td::ConcurrentScheduler>(0, 0); | |
| scheduler | |
| ->create_actor_unsafe<td::Wget>(0, "Client", | |
| td::PromiseCreator::lambda([](td::Result<td::unique_ptr<td::HttpQuery>> res) { | |
| if (res.is_error()) { | |
| LOG(FATAL) << res.error(); | |
| } | |
| LOG(ERROR) << *res.ok(); | |
| td::Scheduler::instance()->finish(); | |
| }), | |
| url, td::Auto(), timeout, ttl, prefer_ipv6) | |
| .release(); | |
| scheduler->start(); | |
| while (scheduler->run_main(10)) { | |
| // empty | |
| } | |
| scheduler->finish(); | |
| } | |
Xet Storage Details
- Size:
- 1.61 kB
- Xet hash:
- 9f15dd306014fee8bb0ab95652479d178a07d89f1a7ad9fa660704eaba922a7e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.