Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ETH = "eth" OTHER = "_" )
Functions ¶
This section is empty.
Types ¶
type Protocol ¶
type Protocol struct { // Name should contain the official protocol name, // often a three-letter word. Name string // Version should contain the version number of the protocol. Version uint // Length should contain the number of message codes used // by the protocol. Length uint64 // Run is called in a new goroutine when the protocol has been // negotiated with a ethPeer. It should read and write messages from // rw. The Payload for each message must be fully consumed. // // The ethPeer connection is closed when Start returns. It should return // any protocol-level error (such as an I/O error) that is // encountered. RunFunc func(peer IPeer) CloseFunc func(peer IPeer) }
Protocol represents a P2P subprotocol implementation.
Click to show internal directories.
Click to hide internal directories.