DEV Community

loading...

code-server for libtorrent 2.0

kyorohiro (kiyohiro kawamura)
Anti blockchain p2p programmer and freelance and all‐rounder. embeded, frontend, backend, infrastructure(on cloud), application, a part‐time lecturer..etc https://kyorohiro.gitbook.io/home/
Updated on ・1 min read

Libtorrent is version 2.0 rc now!!
It Great!!
https://github.com/arvidn/libtorrent

I created a develop environment at docker. In order to give it a try.

https://github.com/kyorohiro/libtorrent_codeserver

Unique Point

This Develop Environment's Good Point

  • bundled vscode
  • using docker
  • autocomplete at vscode c++plugin

You can develop a torrent client with libtorrent Immediately!!
This Pacakge Has Already installed C++ and vscode c++ plugin!!

Procedure

Prepare

git clone https://github.com/kyorohiro/libtorrent_codeserver
cd libtorrent_codeserver
Enter fullscreen mode Exit fullscreen mode
cd res 
git clone https://github.com/arvidn/libtorrent
cd libtorrent
git checkout RC_2_0
git submodule init 
git submodule update
Enter fullscreen mode Exit fullscreen mode

RUN Docke Image

docker-compose build
docker-compose up -d
Enter fullscreen mode Exit fullscreen mode

Open VSCODE on Browser

open "http://127.0.0.1:8443/"
※ 127.0.0.1 is your docker ip

BUILD HELLO WORLD

g++ main_simple_torrent.cpp  -ltorrent-rasterbar -lpthread
Enter fullscreen mode Exit fullscreen mode

START A CLIENT

./a.out xxx.torrent
Enter fullscreen mode Exit fullscreen mode

Discussion (1)

Collapse
kyorohiro profile image
kyorohiro (kiyohiro kawamura) Author