Documentation ¶
Index ¶
- Constants
- type ByteIO
- type Contact
- type ContactContainer
- type ContactFinder
- type ContactListNode
- type ContactLiver
- type ContactManager
- type ContactOnliner
- type ContactTimeList
- type ContactTimeListElementValue
- type CreatedElementValue
- type Ed2kFileStruct
- type ID
- type Kad
- type Kademlia2HelloResMsg
- type Kademlia2ResMsg
- type Kademlia2SearchResMsg
- type Md4Sum
- type Md5Sum
- type Packet
- type PacketProcessor
- type PacketReqGuard
- type PacketReqPerIP
- type Prefs
- type Search
- type SearchDecision
- type SearchManager
- type SearchReq
- type SearchRes
- type Socket
- type SocketManager
- type Tag
- type UDPKey
Constants ¶
const SearchResChSize = 100
SearchResChSize is size of search result reponse channel for each web search.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContactContainer ¶
type ContactContainer struct {
// contains filtered or unexported fields
}
ContactContainer x
type ContactFinder ¶
type ContactFinder struct {
// contains filtered or unexported fields
}
ContactFinder x
type ContactListNode ¶
type ContactListNode struct {
// contains filtered or unexported fields
}
ContactListNode is list node of contact.
type ContactLiver ¶
type ContactLiver struct {
// contains filtered or unexported fields
}
ContactLiver x
type ContactManager ¶
type ContactManager struct {
// contains filtered or unexported fields
}
ContactManager x, controlling the time entry
type ContactOnliner ¶
type ContactOnliner struct {
// contains filtered or unexported fields
}
ContactOnliner x
type ContactTimeList ¶
type ContactTimeList struct {
// contains filtered or unexported fields
}
ContactTimeList is a list with time. Note that time is always growing.
type ContactTimeListElementValue ¶
type ContactTimeListElementValue struct {
// contains filtered or unexported fields
}
ContactTimeListElementValue is element value of list.
type CreatedElementValue ¶
type CreatedElementValue struct {
// contains filtered or unexported fields
}
CreatedElementValue x
type Ed2kFileStruct ¶
type Ed2kFileStruct struct { Hash [16]byte Name string Size uint64 Type string Avail uint32 MediaLength uint32 }
Ed2kFileStruct x
type Kad ¶
type Kad struct { // externs SearchReqCh chan *SearchReq // contains filtered or unexported fields }
Kad x
type Kademlia2HelloResMsg ¶
type Kademlia2HelloResMsg struct {
// contains filtered or unexported fields
}
Kademlia2HelloResMsg x
type Kademlia2ResMsg ¶
type Kademlia2ResMsg struct {
// contains filtered or unexported fields
}
Kademlia2ResMsg x
type Kademlia2SearchResMsg ¶
type Kademlia2SearchResMsg struct {
// contains filtered or unexported fields
}
Kademlia2SearchResMsg x
type Packet ¶
type Packet struct {
// contains filtered or unexported fields
}
Packet is control packet, whose eDonkeyID is opKademliaHeader.
type PacketProcessor ¶
type PacketProcessor struct {
// contains filtered or unexported fields
}
PacketProcessor process sending and receiving of packets from socket. It will generate and send packet(for sending), filter and dispatch packet(for receiving).
type PacketReqGuard ¶
type PacketReqGuard struct {
// contains filtered or unexported fields
}
PacketReqGuard is guard for monitoring each KAD request for each remote IP so that remote KAD client will not drop our packets. Here IPs are not synchronized with these in ContactManager. They're independ.
type PacketReqPerIP ¶
type PacketReqPerIP struct {
// contains filtered or unexported fields
}
PacketReqPerIP is KAD requests counting per IP.
type Prefs ¶
type Prefs struct {
// contains filtered or unexported fields
}
Prefs is my preferences.
type SearchDecision ¶
type SearchDecision struct {
// contains filtered or unexported fields
}
SearchDecision x
type SearchManager ¶
type SearchManager struct {
// contains filtered or unexported fields
}
SearchManager x
type SearchReq ¶
type SearchReq struct { ResCh chan *SearchRes MyKeywordStruct *com.MyKeywordStruct }
SearchReq x
type Socket ¶
type Socket struct {
// contains filtered or unexported fields
}
Socket is KAD UDP socket with encryption
type SocketManager ¶
type SocketManager struct {
// contains filtered or unexported fields
}
SocketManager is manager of sockets for distributing sending packets to sockets by round robin.
type UDPKey ¶
type UDPKey struct {
// contains filtered or unexported fields
}
UDPKey is used to connect me with client. It will be used when I send packet to client. It's bound to my public IP. If I change my public IP(e.g. NAT case) or client change key used to calculate its verify key, it will be invalid.
Source Files ¶
- contact.go
- contactfinder.go
- contactliver.go
- contactmanager.go
- contactonliner.go
- contacttimelist.go
- kad.go
- kad_extern.go
- kad_id.go
- kad_msg.go
- kad_opcodes.go
- kad_prefs.go
- kad_tag.go
- kad_udpkey.go
- misc.go
- misc_byteio.go
- misc_log.go
- misc_md4sum.go
- misc_md5sum.go
- net_packet.go
- net_packetprocessor.go
- net_packetreqguard.go
- net_socket.go
- net_socketmanager.go
- search.go
- searchdecision.go
- searchmanager.go