Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/archeryue/go-torrent
/ functions
Functions
64 in github.com/archeryue/go-torrent
⨍
Functions
64
◇
Types & classes
21
↓ 17 callers
Method
String
()
torrent/bitfield.go:25
↓ 7 callers
Function
Marshal
(w io.Writer, s interface{})
bencode/marshal.go:209
↓ 6 callers
Method
Dict
()
bencode/bencode.go:55
↓ 6 callers
Function
EncodeString
(w io.Writer, val string)
bencode/bencode.go:154
↓ 6 callers
Function
Parse
(r io.Reader)
bencode/parser.go:8
↓ 5 callers
Method
Bencode
(w io.Writer)
bencode/bencode.go:62
↓ 5 callers
Function
EncodeInt
(w io.Writer, val int)
bencode/bencode.go:189
↓ 5 callers
Method
Int
()
bencode/bencode.go:41
↓ 5 callers
Method
List
()
bencode/bencode.go:48
↓ 5 callers
Function
Unmarshal
(r io.Reader, s interface{})
bencode/marshal.go:10
↓ 4 callers
Function
DecodeInt
(r io.Reader)
bencode/bencode.go:206
↓ 4 callers
Function
DecodeString
(r io.Reader)
bencode/bencode.go:170
↓ 4 callers
Method
Str
()
bencode/bencode.go:34
↓ 4 callers
Function
objAssertInt
(t *testing.T, expect int, o *BObject)
bencode/parser_test.go:17
↓ 3 callers
Function
ParseFile
(r io.Reader)
torrent/torrent_file.go:35
↓ 3 callers
Function
marshalValue
(w io.Writer, v reflect.Value)
bencode/marshal.go:166
↓ 3 callers
Function
objAssertStr
(t *testing.T, expect string, o *BObject)
bencode/parser_test.go:10
↓ 2 callers
Method
HasPiece
(index int)
torrent/bitfield.go:7
↓ 2 callers
Function
NewConn
(peer PeerInfo, infoSHA [SHALEN]byte, peerId [IDLEN]byte)
torrent/peer.go:165
↓ 2 callers
Method
ReadMsg
()
torrent/peer.go:84
↓ 2 callers
Method
WriteMsg
(m *PeerMsg)
torrent/peer.go:110
↓ 2 callers
Method
getPieceBounds
(index int)
torrent/download.go:149
↓ 2 callers
Function
readDecimal
(r *bufio.Reader)
bencode/bencode.go:101
↓ 2 callers
Function
unmarshalDict
p.Kind() must be Ptr && p.Elem().Type().Kind() must be Struct
bencode/marshal.go:105
↓ 2 callers
Function
unmarshalList
p.Kind must be Ptr && p.Elem().Type().Kind() must be Slice
bencode/marshal.go:41
↓ 2 callers
Function
writeDecimal
(w *bufio.Writer, val int)
bencode/bencode.go:122
↓ 1 callers
Function
CopyPieceData
(index int, buf []byte, msg *PeerMsg)
torrent/peer.go:123
↓ 1 callers
Function
FindPeers
(tf *TorrentFile, peerId [IDLEN]byte)
torrent/tracker.go:70
↓ 1 callers
Function
GetHaveIndex
(msg *PeerMsg)
torrent/peer.go:146
↓ 1 callers
Function
NewHandShakeMsg
(infoSHA, peerId [IDLEN]byte)
torrent/handshake.go:19
↓ 1 callers
Function
NewRequestMsg
(index, offset, length int)
torrent/peer.go:157
↓ 1 callers
Function
ReadHandshake
(r io.Reader)
torrent/handshake.go:38
↓ 1 callers
Method
SetPiece
(index int)
torrent/bitfield.go:16
↓ 1 callers
Function
WriteHandShake
(w io.Writer, msg *HandshakeMsg)
torrent/handshake.go:27
↓ 1 callers
Function
buildPeerInfo
(peers []byte)
torrent/tracker.go:55
↓ 1 callers
Function
buildUrl
(tf *TorrentFile, peerId [IDLEN]byte)
torrent/tracker.go:34
↓ 1 callers
Function
checkNum
(data byte)
bencode/bencode.go:97
↓ 1 callers
Function
checkPiece
(task *pieceTask, res *pieceResult)
torrent/download.go:108
↓ 1 callers
Function
downloadPiece
(conn *PeerConn, task *pieceTask)
torrent/download.go:75
↓ 1 callers
Function
fillBitfield
(c *PeerConn)
torrent/peer.go:65
↓ 1 callers
Method
handleMsg
()
torrent/download.go:44
↓ 1 callers
Function
handshake
(conn net.Conn, infoSHA [SHALEN]byte, peerId [IDLEN]byte)
torrent/peer.go:41
↓ 1 callers
Function
marshalDict
(w io.Writer, vd reflect.Value)
bencode/marshal.go:192
↓ 1 callers
Function
marshalList
(w io.Writer, vl reflect.Value)
bencode/marshal.go:181
↓ 1 callers
Method
peerRoutine
(peer PeerInfo, taskQueue chan *pieceTask, resultQueue chan *pieceResult)
torrent/download.go:117
Function
Download
(task *TorrentTask)
torrent/download.go:158
Function
TestBencode
generated by ChatGPT-GPT4.0
bencode/bencode_test.go:53
Function
TestInt
(t *testing.T)
bencode/bencode_test.go:29
Function
TestMarshalBasic
(t *testing.T)
bencode/marshal_test.go:31
Function
TestParseComMap
(t *testing.T)
bencode/parser_test.go:83
Function
TestParseFile
(t *testing.T)
torrent/torrent_file_test.go:11
Function
TestParseInt
(t *testing.T)
bencode/parser_test.go:36
Function
TestParseList
(t *testing.T)
bencode/parser_test.go:48
Function
TestParseMap
(t *testing.T)
bencode/parser_test.go:67
Function
TestParseString
(t *testing.T)
bencode/parser_test.go:24
Function
TestPeer
(t *testing.T)
torrent/peer_test.go:12
Function
TestString
(t *testing.T)
bencode/bencode_test.go:10
Function
TestTracker
(t *testing.T)
torrent/tracker_test.go:11
Function
TestUnmarshalList
(t *testing.T)
bencode/marshal_test.go:45
Function
TestUnmarshalRole
(t *testing.T)
bencode/marshal_test.go:70
Function
TestUnmarshalScore
(t *testing.T)
bencode/marshal_test.go:84
Function
TestUnmarshalTeam
(t *testing.T)
bencode/marshal_test.go:98
Function
TestUnmarshalUser
(t *testing.T)
bencode/marshal_test.go:57
Function
main
()
cmd/main.go:12