Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/theobarrague/go-bittorrent

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/theobarrague/go-bittorrent

  • v0.0.0-20220729110241-b8655ab0148f
  • Source
  • Go
  • Socket score

Version published
Created
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

Package last updated on 29 Jul 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc