[][src]Struct grin_p2p::Peer

pub struct Peer {
    pub info: PeerInfo,
    // some fields omitted
}

Fields

Methods

impl Peer
[src]

Main peer loop listening for messages and forwarding to the rest of the system.

Whether this peer is still connected.

Whether this peer has been banned.

Whether this peer is stuck on sync.

Number of bytes sent to the peer

Number of bytes received from the peer

Set this peer status to banned

Send a ping to the remote peer, providing our local difficulty and height

Send the ban reason before banning

Sends the provided block to the remote peer. The request may be dropped if the remote peer is known to already have the block.

Sends the provided transaction to the remote peer. The request may be dropped if the remote peer is known to already have the transaction.

Sends the provided stem transaction to the remote peer. Note: tracking adapter is ignored for stem transactions (while under embargo).

Sends a request for block headers from the provided block locator

Sends a request for a specific block by hash

Sends a request for a specific compact block by hash

Stops the peer, closing its connection

Trait Implementations

impl Send for Peer
[src]

impl Sync for Peer
[src]

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T> SafeBorrow for T where
    T: ?Sized

Given ptr, which was obtained from a prior call to Self::borrow(), return a value with the same nominal lifetime which is guaranteed to survive mutations to Self. Read more

impl<T> UnsafeAny for T where
    T: Any

impl<T> Erased for T

impl<T> Same for T

Should always be Self