Socket
Socket
Sign inDemoInstall

github.com/theobarrague/go-bittorrent

Package Overview
Dependencies
0
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/theobarrague/go-bittorrent


Version published

Readme

Source

go-bittorrent

go-bittorrent is a simple Go module for sending informations to BitTorrent trackers.

Overview

All BitTorrent trackers are supported.

You can build the bittorrent client tool.

Or you can do development by using this golang module as below.

Installation

go get -u github.com/theobarrague/go-bittorrent

Importing

import (
    "github.com/theobarrague/go-bittorrent"
)

Example

upload

client := bittorrent.New("-DE13F0-ABCDEF", 49152)

err := client.Upload(tracker, hash, bytes)

if err == nil {
    fmt.Println("Uploaded", bytes, "bytes")
}

download

client := bittorrent.New("-DE13F0-ABCDEF", 49152)

err := client.Download(tracker, hash, bytes)

if err == nil {
    fmt.Println("Downloaded", bytes, "bytes")
}

License

Copyright © 2022, Théo BARRAGUÉ

Licensed under the MIT License

FAQs

Last updated on 29 Jul 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc