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
↓ 39 callers
Method
String
String returns the bit sequence string of the bitmap.
crawler/dht/bitmap.go:135
↓ 23 callers
Method
RawString
RawString returns the string value of bitmap.data.
crawler/dht/bitmap.go:151
↓ 20 callers
Method
KBucket
KBucket returns the bucket routingTableNode holds.
crawler/dht/routingtable.go:279
↓ 18 callers
Method
Set
Set sets the bit at idnex to 1.
crawler/dht/bitmap.go:86
↓ 16 callers
Function
send
send sends data to the udp.
crawler/dht/krpc.go:128
↓ 15 callers
Method
Get
Get returns the value mapped to key.
crawler/dht/container.go:28
↓ 14 callers
Method
Iter
Iter returns a chan which output all items.
crawler/dht/container.go:77
↓ 12 callers
Method
Bit
Bit returns the bit at index.
crawler/dht/bitmap.go:61
↓ 11 callers
Method
Len
()
crawler/dht/routingtable.go:549
↓ 11 callers
Method
Len
Len returns the length of syncedMap.
crawler/dht/container.go:94
↓ 11 callers
Function
ParseKey
ParseKey parses the key in dict data. `t` is type of the keyed value. It's one of "int", "string", "map", "list".
crawler/dht/krpc.go:371
↓ 10 callers
Method
Delete
Delete deletes the key in the map.
crawler/dht/container.go:51
↓ 10 callers
Method
id
id returns a id near to target if target is not null, otherwise it returns the dht's node id.
crawler/dht/dht.go:231
↓ 9 callers
Function
makeError
makeError returns a err-formed data.
crawler/dht/krpc.go:119
↓ 8 callers
Method
Push
(x interface{})
crawler/dht/routingtable.go:561
↓ 8 callers
Function
newSyncedMap
newSyncedMap returns a syncedMap pointer.
crawler/dht/container.go:20
↓ 7 callers
Method
Child
Child returns routingTableNode's left or right child.
crawler/dht/routingtable.go:258
↓ 7 callers
Method
PushBack
PushBack pushs an element to the tail of slist.
crawler/dht/container.go:140
↓ 7 callers
Function
newBitmapFromString
newBitmapFromString returns a bitmap pointer created from a string.
crawler/dht/bitmap.go:56
↓ 6 callers
Function
Decode
Decode decodes a bencoded string to string, int, list or map.
crawler/dht/bencode.go:192
↓ 6 callers
Method
Insert
Insert inserts node to the bucket. It returns whether the node is new in the bucket.
crawler/dht/routingtable.go:196
↓ 6 callers
Method
in
validate checks whether ip-port pair is in the block nodes list.
crawler/dht/blacklist.go:60
↓ 6 callers
Function
makeResponse
makeResponse returns a response-formed data.
crawler/dht/krpc.go:110
↓ 6 callers
Function
newBitmap
newBitmap returns a size-length bitmap pointer.
crawler/dht/bitmap.go:16
↓ 5 callers
Method
Clear
Clear resets the data.
crawler/dht/container.go:69
↓ 5 callers
Method
Front
Front returns the first element of slist.
crawler/dht/container.go:116
↓ 5 callers
Function
ParseKeys
ParseKeys parses keys. It just wraps ParseKey.
crawler/dht/krpc.go:398
↓ 5 callers
Method
Remove
Remove deletes the node whose id is `id`.
crawler/dht/routingtable.go:486
↓ 5 callers
Method
insert
insert adds a transaction to transactionManager.
crawler/dht/krpc.go:204
↓ 5 callers
Method
insert
insert adds a blocked item to the blacklist.
crawler/dht/blacklist.go:42
↓ 5 callers
Function
newKeyedDeque
newKeyedDeque returns a newKeyedDeque pointer.
crawler/dht/container.go:214
↓ 4 callers
Method
Compare
Compare compares the prefixLen-prefix of two bitmap. - If bitmap.data[:prefixLen] < other.data[:prefixLen], return -1. - If bitmap.data[:prefixLen] >
crawler/dht/bitmap.go:99
↓ 4 callers
Method
HasKey
Has returns whether key already exists.
crawler/dht/container.go:245
↓ 4 callers
Function
genAddress
genAddress returns a ip:port address.
crawler/dht/util.go:132
↓ 4 callers
Method
genKey
genKey returns a key. If port is less than 0, the key wil be ip. Ohterwise it will be `ip:port` format.
crawler/dht/blacklist.go:33
↓ 4 callers
Function
humanFileSize
(bytes, dp=1)
web/src/components/list.js:7
↓ 4 callers
Function
newNode
newNode returns a node pointer.
crawler/dht/routingtable.go:23
↓ 4 callers
Function
randomString
randomString generates a size-length string randomly.
crawler/dht/util.go:15
↓ 4 callers
Method
sendQuery
sendQuery send query-formed data to the chan.
crawler/dht/krpc.go:316
↓ 3 callers
Method
CompactIPPortInfo
CompactIPPortInfo returns "Compact IP-address/port info". See http://www.bittorrent.org/beps/bep_0005.html.
crawler/dht/routingtable.go:52
↓ 3 callers
Method
DeleteMulti
DeleteMulti deletes keys in batch.
crawler/dht/container.go:59
↓ 3 callers
Function
Encode
Encode encodes a string, int, dict or list value to a bencoded string.
crawler/dht/bencode.go:250
↓ 3 callers
Function
EncodeString
EncodeString encodes a string value.
crawler/dht/bencode.go:198
↓ 3 callers
Method
GetNeighbors
GetNeighbors returns the size-length nodes closest to id.
crawler/dht/routingtable.go:418
↓ 3 callers
Method
IsStandardMode
IsStandardMode returns whether mode is StandardMode.
crawler/dht/dht.go:170
↓ 3 callers
Method
Remove
Remove removes e from the slist.
crawler/dht/container.go:168
↓ 3 callers
Method
RemoveByAddr
Remove deletes the node whose address is `ip:port`.
crawler/dht/routingtable.go:495
↓ 3 callers
Method
Send
(ctx context.Context, in *BitTorrent, opts ...grpc.CallOption)
service/bittorrent_grpc.pb.go:20
↓ 3 callers
Method
UpdateTimestamp
UpdateTimestamp update bucket's last changed time..
crawler/dht/routingtable.go:187
↓ 3 callers
Method
clear
clear removes expired tokens.
crawler/dht/krpc.go:72
↓ 3 callers
Function
decodeCompactIPPortInfo
decodeCompactIPPortInfo decodes compactIP-address/port info in BitTorrent DHT Protocol. It returns the ip and port number.
crawler/dht/util.go:54
↓ 3 callers
Function
decodeItem
decodeItem decodes an item of dict or list.
crawler/dht/bencode.go:85
↓ 3 callers
Function
encodeCompactIPPortInfo
encodeCompactIPPortInfo encodes an ip and a port number to compactIP-address/port info.
crawler/dht/util.go:67
↓ 3 callers
Function
file_bittorrent_proto_rawDescGZIP
()
service/bittorrent.pb.go:222
↓ 3 callers
Method
findNode
findNode sends find_node query to the chan.
crawler/dht/krpc.go:341
↓ 3 callers
Function
int2bytes
int2bytes returns the byte array it represents.
crawler/dht/util.go:35
↓ 3 callers
Function
newBlackList
newBlackList returns a blackList pointer.
crawler/dht/blacklist.go:23
↓ 3 callers
Function
newSyncedList
newSyncedList returns a syncedList pointer.
crawler/dht/container.go:108
↓ 3 callers
Function
read
read reads size-length bytes from conn to data.
crawler/dht/peerwire.go:41
↓ 3 callers
Method
token
token returns a token. If it doesn't exist or is expired, it will add a new token.
crawler/dht/krpc.go:55
↓ 2 callers
Method
Back
Back returns the last element of slist.
crawler/dht/container.go:124
↓ 2 callers
Method
CompactNodeInfo
CompactNodeInfo returns "Compact node info". See http://www.bittorrent.org/beps/bep_0005.html.
crawler/dht/routingtable.go:59
↓ 2 callers
Function
EncodeDict
EncodeDict encodes a dict value.
crawler/dht/bencode.go:236
↓ 2 callers
Function
EncodeInt
EncodeInt encodes a int value.
crawler/dht/bencode.go:203
↓ 2 callers
Function
EncodeList
EncodeList encodes a list value.
crawler/dht/bencode.go:225
↓ 2 callers
Method
Fresh
Fresh pings the expired nodes in the bucket.
crawler/dht/routingtable.go:233
↓ 2 callers
Method
GetNeighborCompactInfos
GetNeighborIds return the size-length compact node info closest to id.
crawler/dht/routingtable.go:436
↓ 2 callers
Method
GetNodeKBucktByID
GetNodeKBucktById returns node whose id is `id` and the bucket it belongs to.
crawler/dht/routingtable.go:449
↓ 2 callers
Method
Has
Has returns whether the syncedMap contains the key.
crawler/dht/container.go:37
↓ 2 callers
Method
IsCrawlMode
IsCrawlMode returns whether mode is CrawlMode.
crawler/dht/dht.go:175
↓ 2 callers
Function
NewStandardConfig
NewStandardConfig returns a Config pointer with default values.
crawler/dht/dht.go:76
↓ 2 callers
Method
Pop
()
crawler/dht/routingtable.go:565
↓ 2 callers
Method
Xor
Xor returns the xor value of two bitmap.
crawler/dht/bitmap.go:123
↓ 2 callers
Function
bytes2int
bytes2int returns the int value it represents.
crawler/dht/util.go:22
↓ 2 callers
Method
delete
delete removes a transaction from transactionManager.
crawler/dht/krpc.go:213
↓ 2 callers
Function
encodeItem
EncodeItem encodes an item of dict or list.
crawler/dht/bencode.go:208
↓ 2 callers
Method
filterOne
transaction gets the proper transaction with whose id is transId and address is addr.
crawler/dht/krpc.go:262
↓ 2 callers
Function
find
find returns the index of first target in data starting from `start`. It returns -1 if target not found.
crawler/dht/bencode.go:14
↓ 2 callers
Function
findOn
findOn puts nodes in the response to the routingTable, then if target is in the nodes or all nodes are in the routingTable, it stops. Otherwise it con
crawler/dht/krpc.go:595
↓ 2 callers
Method
genIndexKey
genIndexKey generates an indexed key which consists of queryType and address.
crawler/dht/krpc.go:194
↓ 2 callers
Method
genIndexKeyByTrans
genIndexKeyByTrans generates an indexed key by a transaction.
crawler/dht/krpc.go:199
↓ 2 callers
Method
getPeers
getPeers sends get_peers query to the chan.
crawler/dht/krpc.go:349
↓ 2 callers
Method
join
join makes current node join the dht network.
crawler/dht/dht.go:199
↓ 2 callers
Function
newBitmapFrom
newBitmapFrom returns a new copyed bitmap pointer which newBitmap.data = other.data[:size].
crawler/dht/bitmap.go:26
↓ 2 callers
Function
newBitmapFromBytes
newBitmapFromBytes returns a bitmap pointer created from a byte array.
crawler/dht/bitmap.go:49
↓ 2 callers
Function
newPeer
newPeer returns a new peer pointer.
crawler/dht/routingtable.go:73
↓ 2 callers
Function
newRoutingTableNode
newRoutingTableNode returns a new routingTableNode pointer.
crawler/dht/routingtable.go:250
↓ 2 callers
Function
sendMessage
sendMessage sends data to the connection.
crawler/dht/peerwire.go:71
↓ 2 callers
Method
set
set sets the bit at index `index`. If bit is true, set 1, otherwise set 0.
crawler/dht/bitmap.go:71
↓ 2 callers
Method
transaction
transaction returns a transaction. keyType should be one of 0, 1 which represents transId and index each.
crawler/dht/krpc.go:234
↓ 1 callers
Function
DecodeDict
DecodeDict decodes a map value.
crawler/dht/bencode.go:140
↓ 1 callers
Function
DecodeString
DecodeString decodes a string in the data. It returns a tuple (decoded result, the end position, error).
crawler/dht/bencode.go:24
↓ 1 callers
Method
Delete
Delete deletes a value named key.
crawler/dht/container.go:251
↓ 1 callers
Method
Get
Get returns the keyed value.
crawler/dht/container.go:236
↓ 1 callers
Method
GetNodeByAddress
GetNodeByAddress finds node by address.
crawler/dht/routingtable.go:474
↓ 1 callers
Method
GetPeers
GetPeers returns peers who have announced having infoHash.
crawler/dht/dht.go:239
↓ 1 callers
Method
InsertBefore
InsertBefore inserts v before mark.
crawler/dht/container.go:148
↓ 1 callers
Method
LastChanged
LastChanged return the last time when it changes.
crawler/dht/routingtable.go:169
↓ 1 callers
Function
Process
process data from redis message queue by indexing them to elastic search
server/main.go:72
↓ 1 callers
Method
Push
Push pushs a keyed-value to the end of deque.
crawler/dht/container.go:224
next →
1–100 of 228, ranked by callers