[−][src]Trait lib3h_protocol::network_engine::NetworkEngine
Common interface for all types of network modules to be used by the Lib3hWorker
Required methods
fn run(&self) -> Lib3hResult<()>
Start network communications
fn stop(&self) -> Lib3hResult<()>
Stop network communications
fn terminate(&self) -> Lib3hResult<()>
Terminate module. Perform some cleanup.
fn post(&mut self, data: Lib3hClientProtocol) -> Lib3hResult<()>
Post a protocol message from core -> lib3h
fn process(&mut self) -> Lib3hResult<(DidWork, Vec<Lib3hServerProtocol>)>
A single iteration of the networking process loop (should be called frequently to not cpu starve networking) Returns a vector of protocol messages core is required to handle.
fn advertise(&self) -> Url
Get qualified transport address