Documentation ¶
Index ¶
- Variables
- type IoEvent
- type LibP2pPhysicalCommunicator
- func (c *LibP2pPhysicalCommunicator) ClosePeer(id string)
- func (c *LibP2pPhysicalCommunicator) Enqueue(req *OutgoingRequest)
- func (c *LibP2pPhysicalCommunicator) GetIncomingChannel() chan *WireMessage
- func (c *LibP2pPhysicalCommunicator) GetNeighbour(id string) (neighbour *Neighbour, err error)
- func (c *LibP2pPhysicalCommunicator) HandlePeerStream(s network.Stream)
- func (c *LibP2pPhysicalCommunicator) InitDefault()
- func (c *LibP2pPhysicalCommunicator) Listen()
- func (c *LibP2pPhysicalCommunicator) Start()
- func (c *LibP2pPhysicalCommunicator) Stop()
- func (c *LibP2pPhysicalCommunicator) SuggestConnection(address string) (peerIds string)
- type Neighbour
Constants ¶
This section is empty.
Variables ¶
View Source
var BackoffConnect = time.Second * 5
View Source
var IpLayerProtocol = "tcp"
Functions ¶
This section is empty.
Types ¶
type LibP2pPhysicalCommunicator ¶
type LibP2pPhysicalCommunicator struct { Port int // listening port PrivateKey core.PrivKey // contains filtered or unexported fields }
LibP2pPhysicalCommunicator
func (*LibP2pPhysicalCommunicator) ClosePeer ¶
func (c *LibP2pPhysicalCommunicator) ClosePeer(id string)
func (*LibP2pPhysicalCommunicator) Enqueue ¶
func (c *LibP2pPhysicalCommunicator) Enqueue(req *OutgoingRequest)
func (*LibP2pPhysicalCommunicator) GetIncomingChannel ¶
func (c *LibP2pPhysicalCommunicator) GetIncomingChannel() chan *WireMessage
func (*LibP2pPhysicalCommunicator) GetNeighbour ¶
func (c *LibP2pPhysicalCommunicator) GetNeighbour(id string) (neighbour *Neighbour, err error)
func (*LibP2pPhysicalCommunicator) HandlePeerStream ¶
func (c *LibP2pPhysicalCommunicator) HandlePeerStream(s network.Stream)
func (*LibP2pPhysicalCommunicator) InitDefault ¶
func (c *LibP2pPhysicalCommunicator) InitDefault()
func (*LibP2pPhysicalCommunicator) Listen ¶
func (c *LibP2pPhysicalCommunicator) Listen()
func (*LibP2pPhysicalCommunicator) Start ¶
func (c *LibP2pPhysicalCommunicator) Start()
func (*LibP2pPhysicalCommunicator) Stop ¶
func (c *LibP2pPhysicalCommunicator) Stop()
func (*LibP2pPhysicalCommunicator) SuggestConnection ¶
func (c *LibP2pPhysicalCommunicator) SuggestConnection(address string) (peerIds string)
SuggestConnection takes a peer address and try to connect to it.
type Neighbour ¶
type Neighbour struct { Id peer.ID Stream network.Stream IoEventChannel chan *IoEvent IncomingChannel chan *WireMessage // contains filtered or unexported fields }
func (*Neighbour) InitDefault ¶
func (c *Neighbour) InitDefault()
func (*Neighbour) StartWrite ¶
func (c *Neighbour) StartWrite()
Click to show internal directories.
Click to hide internal directories.