Documentation ¶
Index ¶
Constants ¶
View Source
const ( PEXProtocolID = "/pex/2.0.0" DefaultGetPeersMaxCount = 30 )
View Source
const ( MessageTypeGetPeers = iota MessageTypeAdvertise MessageTypePing MessageTypePong )
Variables ¶
View Source
var (
Random = rand.New(cryptoSource{})
)
Functions ¶
This section is empty.
Types ¶
type DiscoveryNetworkManager ¶
type DiscoveryNetworkManager struct {
// contains filtered or unexported fields
}
func NewPEXDiscoveryNetwork ¶
func NewPEXDiscoveryNetwork(ctx context.Context, pex *PEXDiscovery) *DiscoveryNetworkManager
type Handler ¶
type Handler func(ctx context.Context, peerID peer.ID, msg *PEXMessage) (*PEXMessage, error)
type PEXDiscovery ¶
type PEXDiscovery struct {
// contains filtered or unexported fields
}
func NewPEXDiscovery ¶
type PEXMessage ¶
type StreamWrapper ¶
type StreamWrapper struct {
// contains filtered or unexported fields
}
func (*StreamWrapper) SendMessage ¶
func (sw *StreamWrapper) SendMessage(ctx context.Context, msg *PEXMessage) error
func (*StreamWrapper) SendRequest ¶
func (sw *StreamWrapper) SendRequest(ctx context.Context, msg *PEXMessage) (*PEXMessage, error)
Click to show internal directories.
Click to hide internal directories.