kad

package
v0.0.0-...-2d6549b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
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 ByteIO

type ByteIO struct {
	// contains filtered or unexported fields
}

ByteIO x

type Contact

type Contact struct {
	// contains filtered or unexported fields
}

Contact x

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

func (f *Ed2kFileStruct) GetEd2kLink() string

GetEd2kLink x

func (*Ed2kFileStruct) GetPrintStr

func (f *Ed2kFileStruct) GetPrintStr() string

GetPrintStr x

type ID

type ID struct {
	// contains filtered or unexported fields
}

ID is KAD ID

type Kad

type Kad struct {

	// externs
	SearchReqCh chan *SearchReq
	// contains filtered or unexported fields
}

Kad x

func (*Kad) Start

func (k *Kad) Start() bool

Start 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 Md4Sum

type Md4Sum struct {
	// contains filtered or unexported fields
}

Md4Sum x

type Md5Sum

type Md5Sum struct {
	// contains filtered or unexported fields
}

Md5Sum 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 Search struct {
	// contains filtered or unexported fields
}

Search x

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 SearchRes

type SearchRes struct {
	FileLinks []*com.Ed2kFileLink
}

SearchRes 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 Tag

type Tag struct {
	// contains filtered or unexported fields
}

Tag x

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL