Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PeterKwesiAnsah/bitty
/ functions
Functions
24 in github.com/PeterKwesiAnsah/bitty
⨍
Functions
24
◇
Types & classes
15
↓ 4 callers
Method
String
()
peers/peers.go:118
↓ 3 callers
Function
ReadMessage
(r io.Reader)
message/message.go:44
↓ 3 callers
Method
Serialize
()
message/message.go:73
↓ 1 callers
Method
CheckPieceIntegrity
(downloadedPiece []byte, pieceHash [20]byte)
worker/worker.go:35
↓ 1 callers
Function
Decode
Takes a path to torrent ,read it into a bencode stream and serializes it to a bencodeTorrent Struct
bencodeTorrent/decode.go:63
↓ 1 callers
Method
Download
(pieceIndex, pieceLength int)
worker/worker.go:139
↓ 1 callers
Method
Download
(dstPath string)
torrentfile/torrentfile.go:148
↓ 1 callers
Method
HasPiece
HasPiece tells if a bitfield has a particular index set
bitfield/bitfield.go:14
↓ 1 callers
Method
Interested
Interested sends an Interested message to the peer
worker/worker.go:64
↓ 1 callers
Function
Peers
findPeers sends an HTTP GET request to the tracker with the specified parameters
peers/peers.go:89
↓ 1 callers
Function
Read
(conn io.Reader)
bitfield/bitfield.go:23
↓ 1 callers
Method
SendUnchoke
SendUnchoke tells the peer you are ready to talk
worker/worker.go:57
↓ 1 callers
Method
Serialize
()
handshake/handshake.go:54
↓ 1 callers
Method
infoHash
Serializes the bencodeInfo into a SHA-1 hash
bencodeTorrent/decode.go:32
↓ 1 callers
Method
initDownloadWorker
(peer peers.Peer, resultsQueue chan<- resultPiece, workQueue chan *worker.WorkPiece)
torrentfile/torrentfile.go:59
↓ 1 callers
Function
parsePeers
(peers []byte)
peers/peers.go:70
↓ 1 callers
Method
performHandShake
(conn net.Conn)
torrentfile/torrentfile.go:35
↓ 1 callers
Method
pieceHashes
* * returns a slice of an array of bytes , with each array representing the SHA-1 hash of a piece */
bencodeTorrent/decode.go:45
↓ 1 callers
Method
processMsg
(dm *downloadManager)
worker/worker.go:116
↓ 1 callers
Method
processMsgPiece
read,process incoming request messages
worker/worker.go:92
↓ 1 callers
Method
request
requests buffer from peer
worker/worker.go:71
↓ 1 callers
Function
trackerInfo
(infoHash [20]byte, announce string, infoLength int)
peers/peers.go:36
Function
Read
(r io.Reader)
handshake/handshake.go:22
Function
main
()
main.go:14