[][src]Struct p2p::Context

pub struct Context { /* fields omitted */ }
[]

Network context.

Methods

impl Context
[src]
[]

[]

Creates new context with reference to local sync node, thread pool and event loop.

[]

Spawns a future using thread pool and schedules execution of it with event loop handle.

[]

Schedules execution of function in future. Use wisely, it keeps used objects in memory until after it is resolved.

Important traits for Vec<u8>
[]

Returns addresses of recently active nodes. Sorted and limited to 1000.

[]

Updates node table.

[]

Penalize node.

[]

Adds node to table.

[]

Removes node from table.

[]

Every 10 seconds check if we have reached maximum number of outbound connections. If not, connect to best peers.

[]

Connect to socket using given context.

Important traits for Box<R>

[]

Starts tcp server and listens for incomming connections.

[]

Called on incomming mesage.

[]

Send message to a channel with given peer id.

[]

Send message using given channel.

[]

Close channel with given peer info.

[]

Close channel with given peer info.

Important traits for Vec<u8>

Auto Trait Implementations

impl Send for Context

impl Sync for Context

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]
[]

Important traits for &'a mut R
[]

Immutably borrows from an owned value. 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]
[]

Important traits for &'a mut R
[]

Mutably 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> Erased for T