bitfield

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

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