Documentation
¶
Index ¶
Constants ¶
View Source
const ( // PingSignal represents a ping signal to a peer PingSignal = byte(0x0) // PongSignal represents a pong respond to a peer PongSignal = byte(0x1) )
Variables ¶
This section is empty.
Functions ¶
func GetTestListener ¶
GetTestListener returns a net.Listener instance
func GetTestNetconn ¶
GetTestNetconn returns a net.Conn instance
func GetTestRandPubKey ¶
GetTestRandPubKey returns a randomly generated public key
Types ¶
type Message ¶
type Message struct {
PeerID string
ChannelID common.ChannelIDEnum
Content interface{}
}
Message models the message sent/received through the P2P network
type NodeInfo ¶
type NodeInfo struct {
PubKey *crypto.PublicKey `rlp:"-"`
PubKeyBytes common.Bytes // needed for RLP serialization
Port uint16
}
NodeInfo provides the information of the corresponding blockchain node of the peer
type StackError ¶
type StackError struct {
Err interface{}
Stack []byte
}
func (StackError) Error ¶
func (se StackError) Error() string
func (StackError) String ¶
func (se StackError) String() string
Click to show internal directories.
Click to hide internal directories.