Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Olament/gDHT
/ functions
Functions
228 in github.com/Olament/gDHT
⨍
Functions
228
◇
Types & classes
47
↓ 1 callers
Method
RandomChildID
RandomChildID returns a random id that has the same prefix with bucket.
crawler/dht/routingtable.go:177
↓ 1 callers
Method
Replace
Replace removes node, then put bucket.candidates.Back() to the right place of bucket.nodes.
crawler/dht/routingtable.go:207
↓ 1 callers
Method
Request
Request pushes the request to the queue.
crawler/dht/peerwire.go:185
↓ 1 callers
Method
Reset
()
service/bittorrent.pb.go:146
↓ 1 callers
Method
Response
Response returns a chan of Response.
crawler/dht/peerwire.go:190
↓ 1 callers
Method
Run
Run starts the peer wire protocol.
crawler/dht/peerwire.go:362
↓ 1 callers
Method
Run
Run starts the dht.
crawler/dht/dht.go:267
↓ 1 callers
Method
SetChild
SetChild sets routingTableNode's left or right child. When index is 0, it's the left child, if 1, it's the right child.
crawler/dht/routingtable.go:271
↓ 1 callers
Method
SetKBucket
SetKBucket sets the bucket.
crawler/dht/routingtable.go:287
↓ 1 callers
Method
Split
Split splits current routingTableNode and sets it's two children.
crawler/dht/routingtable.go:295
↓ 1 callers
Method
Unset
Unset sets the bit at idnex to 0.
crawler/dht/bitmap.go:91
↓ 1 callers
Method
check
check returns whether the token is valid.
crawler/dht/krpc.go:87
↓ 1 callers
Method
delete
delete removes blocked item form the blackList.
crawler/dht/blacklist.go:55
↓ 1 callers
Method
fetchMetadata
fetchMetadata fetchs medata info accroding to infohash from dht.
crawler/dht/peerwire.go:226
↓ 1 callers
Function
file_bittorrent_proto_init
()
service/bittorrent.pb.go:247
↓ 1 callers
Method
genTransID
genTransID generates a transaction id and returns it.
crawler/dht/krpc.go:175
↓ 1 callers
Method
getByIndex
getByIndex returns a transaction by indexed key.
crawler/dht/krpc.go:256
↓ 1 callers
Method
getByTransID
getByTransID returns a transaction by transID.
crawler/dht/krpc.go:251
↓ 1 callers
Function
getLocalIPs
getLocalIPs returns local ips.
crawler/dht/util.go:85
↓ 1 callers
Function
getRemoteIP
getRemoteIP returns the wlan ip.
crawler/dht/util.go:104
↓ 1 callers
Function
getTopK
getTopK solves the top-k problem with heap. It's time complexity is O(n*log(k)). When n is large, time complexity will be too high, need to be optimiz
crawler/dht/routingtable.go:575
↓ 1 callers
Function
getUTMetaSize
getUTMetaSize returns the ut_metadata and metadata_size.
crawler/dht/peerwire.go:115
↓ 1 callers
Function
handle
handle handles packets received from udp.
crawler/dht/krpc.go:755
↓ 1 callers
Function
handleFiles
(torrent)
web/src/components/list.js:64
↓ 1 callers
Method
init
init initializes global varables.
crawler/dht/dht.go:180
↓ 1 callers
Method
isDone
isDone returns whether the wire get all pieces of the metadata info.
crawler/dht/peerwire.go:195
↓ 1 callers
Method
len
len returns how many transactions are requesting now.
crawler/dht/krpc.go:228
↓ 1 callers
Method
listen
listen receives message from udp.
crawler/dht/dht.go:215
↓ 1 callers
Function
makeQuery
makeQuery returns a query-formed data.
crawler/dht/krpc.go:100
↓ 1 callers
Function
newKBucket
newKBucket returns a new kbucket pointer.
crawler/dht/routingtable.go:158
↓ 1 callers
Function
newNodeFromCompactInfo
newNodeFromCompactInfo parses compactNodeInfo and returns a node pointer.
crawler/dht/routingtable.go:37
↓ 1 callers
Function
newPeerFromCompactIPPortInfo
newPeerFromCompactIPPortInfo create a peer pointer by compact ip/port info.
crawler/dht/routingtable.go:82
↓ 1 callers
Function
newPeersManager
newPeersManager returns a new peersManager.
crawler/dht/routingtable.go:106
↓ 1 callers
Function
newRoutingTable
newRoutingTable returns a new routingTable pointer.
crawler/dht/routingtable.go:338
↓ 1 callers
Function
newTokenManager
newTokenManager returns a new tokenManager.
crawler/dht/krpc.go:45
↓ 1 callers
Method
newTransaction
newTransaction creates a new transaction.
crawler/dht/krpc.go:184
↓ 1 callers
Function
newTransactionManager
newTransactionManager returns new transactionManager pointer.
crawler/dht/krpc.go:163
↓ 1 callers
Function
onHandshake
onHandshake handles the handshake response.
crawler/dht/peerwire.go:95
↓ 1 callers
Function
parseMessage
parseMessage parses the basic data received from udp. It returns a map value.
crawler/dht/krpc.go:410
↓ 1 callers
Method
ping
ping sends ping query to the chan.
crawler/dht/krpc.go:334
↓ 1 callers
Method
query
query sends the query-formed data to udp and wait for the response. When timeout, it will retry `try - 1` times, which means it will query `try` times
crawler/dht/krpc.go:276
↓ 1 callers
Function
readMessage
readMessage gets a message from the tcp connection.
crawler/dht/peerwire.go:52
↓ 1 callers
Method
render
()
web/src/components/search.js:31
↓ 1 callers
Method
requestPieces
( conn *net.TCPConn, utMetadata int, metadataSize int, piecesNum int)
crawler/dht/peerwire.go:204
↓ 1 callers
Method
run
run starts to listen and consume the query chan.
crawler/dht/krpc.go:304
↓ 1 callers
Function
sendExtHandshake
sendExtHandshake requests for the ut_metadata and metadata_size.
crawler/dht/peerwire.go:103
↓ 1 callers
Function
sendHandshake
sendHandshake sends handshake message to conn.
crawler/dht/peerwire.go:83
↓ 1 callers
Function
xor
(dst, a, b []byte)
crawler/dht/bitmap_xor.go:5
Method
Clear
Clear resets the list queue.
crawler/dht/container.go:176
Method
Clear
Clear resets the deque.
crawler/dht/container.go:282
Method
CompactIPPortInfo
CompactIPPortInfo returns "Compact node info". See http://www.bittorrent.org/beps/bep_0005.html.
crawler/dht/routingtable.go:93
Function
DecodeInt
DecodeInt decodes int value in the data.
crawler/dht/bencode.go:60
Function
DecodeList
DecodeList decodes a list value.
crawler/dht/bencode.go:104
Method
Descriptor
Deprecated: Use Empty.ProtoReflect.Descriptor instead.
service/bittorrent.pb.go:62
Method
Descriptor
Deprecated: Use BitTorrent.ProtoReflect.Descriptor instead.
service/bittorrent.pb.go:105
Method
Descriptor
Deprecated: Use File.ProtoReflect.Descriptor instead.
service/bittorrent.pb.go:174
Method
Fresh
Fresh sends findNode to all nodes in the expired nodes.
crawler/dht/routingtable.go:503
Method
GetFiles
()
service/bittorrent.pb.go:123
Method
GetInfohash
()
service/bittorrent.pb.go:109
Method
GetLength
()
service/bittorrent.pb.go:130
Method
GetLength
()
service/bittorrent.pb.go:185
Method
GetName
()
service/bittorrent.pb.go:116
Method
GetPath
()
service/bittorrent.pb.go:178
Method
GetPeers
GetPeers returns size-length peers who announces having infoHash.
crawler/dht/routingtable.go:131
Method
Insert
Insert adds a peer into peersManager.
crawler/dht/routingtable.go:114
Method
Insert
Insert adds a node to routing table. It returns whether the node is new in the routingtable.
crawler/dht/routingtable.go:357
Method
InsertAfter
InsertAfter inserts v after mark.
crawler/dht/container.go:158
Method
Iter
Iter returns a chan which output all elements.
crawler/dht/container.go:192
Method
Len
Len returns the number of nodes in table.
crawler/dht/routingtable.go:534
Method
Len
Len returns length of the slist.
crawler/dht/container.go:184
Method
Less
(i, j int)
crawler/dht/routingtable.go:553
Function
New
New returns a DHT pointer. If config is nil, then config will be set to the default config.
crawler/dht/dht.go:133
Function
NewBitTorrentClient
(cc grpc.ClientConnInterface)
service/bittorrent_grpc.pb.go:27
Function
NewCrawlConfig
NewCrawlConfig returns a config in crawling mode.
crawler/dht/dht.go:104
Function
NewWire
NewWire returns a Wire pointer. - blackListSize: the blacklist size - requestQueueSize: the max requests it can buffers - workerQueueSize: the max gor
crawler/dht/peerwire.go:174
Method
ProtoMessage
()
service/bittorrent.pb.go:47
Method
ProtoMessage
()
service/bittorrent.pb.go:90
Method
ProtoMessage
()
service/bittorrent.pb.go:159
Method
ProtoReflect
()
service/bittorrent.pb.go:49
Method
ProtoReflect
()
service/bittorrent.pb.go:92
Method
ProtoReflect
()
service/bittorrent.pb.go:161
Method
PushFront
PushFront pushs an element to the head of slist.
crawler/dht/container.go:132
Function
RegisterBitTorrentServer
(s *grpc.Server, srv BitTorrentServer)
service/bittorrent_grpc.pb.go:57
Method
Remove
Removes overwrites list.List.Remove.
crawler/dht/container.go:269
Method
Reset
()
service/bittorrent.pb.go:34
Method
Reset
()
service/bittorrent.pb.go:77
Method
Send
(ctx context.Context, in *BitTorrent, opts ...grpc.CallOption)
service/bittorrent_grpc.pb.go:31
Method
Send
(context.Context, *BitTorrent)
service/bittorrent_grpc.pb.go:44
Method
Send
(context.Context, *BitTorrent)
service/bittorrent_grpc.pb.go:52
Method
Send
(ctx context.Context, in *pb.BitTorrent)
server/main.go:42
Method
Set
Set sets pair {key: val}.
crawler/dht/container.go:43
Method
String
()
service/bittorrent.pb.go:43
Method
String
()
service/bittorrent.pb.go:86
Method
String
()
service/bittorrent.pb.go:155
Method
Swap
(i, j int)
crawler/dht/routingtable.go:557
Function
TestBitmap
(t *testing.T)
crawler/dht/bitmap_test.go:7
Function
TestBlackList
(t *testing.T)
crawler/dht/blacklist_test.go:35
Function
TestBytes2Int
(t *testing.T)
crawler/dht/util_test.go:32
Function
TestDecodeCompactIPPortInfo
(t *testing.T)
crawler/dht/util_test.go:50
Function
TestDecodeDict
(t *testing.T)
crawler/dht/bencode_test.go:97
← previous
next →
101–200 of 228, ranked by callers