pub trait Peer<P>: Deref<Target = P> + DerefMut<Target = P> + 'staticwhere
    P: StateMachine,
{ fn init(&mut self); fn addr(&self) -> SocketAddr; }
Expand description

A simulated peer. Protocol instances have to be wrapped in this type to be simulated.

Required Methods

Initialize the peer. This should at minimum initialize the protocol with the current time.

Get the peer address.

Implementors