bitfield

package
v0.0.0-...-e0f58e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2023 License: GPL-3.0 Imports: 0 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitfield

type Bitfield []byte

A Bitfield represents the pieces that a peer has

func (Bitfield) HasPiece

func (bf Bitfield) HasPiece(index int) bool

HasPiece tells if a bitfield has a particular index set

func (Bitfield) SetPiece

func (bf Bitfield) SetPiece(index int)

SetPiece sets a bit in the bitfield

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL