Overhaul cmake configuration, add console api, fix http code that caused issues with cgi-bin

This commit is contained in:
2026-05-27 03:02:16 -05:00
parent 266ef5f830
commit 8413c67ec6
177 changed files with 20088 additions and 17948 deletions

View File

@@ -6,18 +6,15 @@ using namespace Tesses::Framework::Filesystem;
using namespace Tesses::Framework::Serialization::Bencode;
using namespace Tesses::Framework::TextStreams;
using namespace Tesses::Framework::BitTorrent;
int main(int argc, char** argv)
{
int main(int argc, char **argv) {
TF_Init();
if(argc < 2)
{
printf("USAGE: %s /path/to/torrent/file\n",argv[0]);
if (argc < 2) {
printf("USAGE: %s /path/to/torrent/file\n", argv[0]);
return 1;
}
auto strm = LocalFS->OpenFile((std::string)argv[1],"rb");
auto strm = LocalFS->OpenFile((std::string)argv[1], "rb");
auto bencode = Bencode::Load(strm);
if(std::holds_alternative<BeDictionary>(bencode))
{
if (std::holds_alternative<BeDictionary>(bencode)) {
TorrentFile file(std::get<BeDictionary>(bencode));
file.Print(std::make_shared<ConsoleWriter>());