GithubHelp home page GithubHelp logo

Comments (7)

Zilog8 avatar Zilog8 commented on September 17, 2024

The torrentSession struct has a field "peers", which is type "map[string]*peerState". This is a map from a string representation of a peer address (e.g. "173.194.123.37:1213") to a struct that stores the peer's current state.

from taipei-torrent.

debunge avatar debunge commented on September 17, 2024

Thank you. On a related note, how do I control upload\download limits?

from taipei-torrent.

Zilog8 avatar Zilog8 commented on September 17, 2024

the upload/download ratio is input as one of the command line arguments. Look for the "seedRatio" flag in main.go.

from taipei-torrent.

debunge avatar debunge commented on September 17, 2024

One more question and I will stop bothering you. How do I add torrent from magnet link?

from taipei-torrent.

Zilog8 avatar Zilog8 commented on September 17, 2024

No bother. From the command-line, just add the magnet link (between quotes) instead of a filepath.
Example: "magnet:?xt=urn:btih:bbb6db69965af769f664b6636e7914f8735141b3"

Here's how it works in a nutshell: Main.go parses the command-line flags, and passes the leftover arguments to RunTorrents. Then RunTorrents calls a NewTorrentSession with each argument string. Finally, NewTorrentSession checks the argument string to determine if it's a magnet link or a filepath.

from taipei-torrent.

debunge avatar debunge commented on September 17, 2024

Thank you. It is all much clearer now.

from taipei-torrent.

Zilog8 avatar Zilog8 commented on September 17, 2024

Always glad to help.

from taipei-torrent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.