@porla/libtorrent
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-rc.3 • Public • Published

Node.js bindings for Rasterbar-libtorrent

This library provides (mostly) complete bindings against Rasterbar-libtorrent compiled with SSL support. It tries to map one-to-one against the Rastebar- libtorrent API.

Getting started

const lt = require("@porla/libtorrent");

const params = new lt.AddTorrentParams();
params.save_path = ".";
params.ti = new lt.TorrentInfo("/path/to/torrent");

const session = new lt.Session();
session.add_torrent(params);
session.on("add_torrent", () => console.log("Torrent added"));
session.on("state_update", () => console.log("State updated"));

setInterval(() => s.post_torrent_updates(), 1000);

Building

vcpkg is used for native dependency management. You need CMake and a proper C++ toolchain.

Running yarn should build everything.

Readme

Keywords

none

Package Sidebar

Install

npm i @porla/libtorrent

Weekly Downloads

1

Version

1.0.0-rc.3

License

MIT

Unpacked Size

29.2 MB

Total Files

8

Last publish

Collaborators

  • vktr