Trait ethcore_light::net::BasicContext [] [src]

pub trait BasicContext {
    fn persistent_peer_id(&self, peer: PeerId) -> Option<NodeId>;
    fn request_from(&self, peer: PeerId, request: Request) -> Result<ReqId, Error>;
    fn make_announcement(&self, announcement: Announcement);
    fn max_requests(&self, peer: PeerId, kind: Kind) -> usize;
    fn disconnect_peer(&self, peer: PeerId);
    fn disable_peer(&self, peer: PeerId);
}

Basic context for the protocol.

Required Methods

Returns the relevant's peer persistent Id (aka NodeId).

Make a request from a peer.

Make an announcement of new capabilities to the rest of the peers.

Find the maximum number of requests of a specific type which can be made from supplied peer.

Disconnect a peer.

Disable a peer.

Implementors