BitTorrent in xTalk (LiveCode Script)

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ClipArtGuy
Posts: 269
Joined: Wed Aug 19, 2015 4:29 pm

BitTorrent in xTalk (LiveCode Script)

Post by ClipArtGuy »

I've wrapped the libtorrent library for XTalk (Including LiveCode "Classic") and built a sample demo client to go with it. It's a fully working BitTorrent client - add magnets or .torrent files, download several at once, and create and seed your own - and the library covers as much of the protocol as I could fit in (DHT, magnets, trackers, seeding, and the rest).
toerrentxt.png
The native engine is bundled inside, so it installs like any other extension - no extra setup.

This opens up a lot beyond just a client: self-seeding app updates, P2P file sharing, sending big project files or class datasets around without a server, and plenty more.

Here's a YouTube video of the install and the client downloading multiple torrents:

https://www.youtube.com/watch?v=37VrDm-nNhs

The GitHub is here and has everything you need to get started in the src folder. The Zip is too large for this forum, you can download from here:

sethmorrow.com/TorrentXT,zip

https://github.com/SethMorrowSoftware/TorrentXT

The videos and samples were made and shown in OXT, but also tested and working in LiveCode Community 9.6.3 Next up is adding a DHT key-value store to the library, so you can put and get small values (up to ~1KB) on the BitTorrent DHT itself, no server needed. They can be immutable (looked up by a content hash) or mutable (published under a signed key you own, so only you can update them).

This opens up things like peer rendezvous (two apps finding each other with no server), publishing a "latest version" pointer nobody can take down, or sharing small data by a short code. And since a magnet link easily fits, you can publish a magnet under your key and let the rest of the library move the actual files. Server-less publish-and-distribute, all from xTalk!
Post Reply