Sync IPC interface (#1584)
* chain notify trait * replaced network service with io service * fix ethcore crate warnings * refactored network service without generic * ethcore fix * ethsync refactoring * proper linking of notify * manage network interface * rpc crate rebinding * full rewire * sync internal io service * fix deadlock * fix warnings and removed async io * sync imported message propagation * fix rpc warnings * binart warnings * test fixes * rpc mocks and tests * fix util doctest * fix message name and removed empty notifier * pointers mess & dark mode fixed * fixed sync doctest * added few warnings * fix review * new convention match * fix error unwraps * doctest fix * basic library re-layout * missing files to relayout * duplicating network config on sync level * binary serializers for config * ipc endpoint for manage * ipc endpoint for sync * handshake sorting out * sorting out the multi-interface dispatch scenario * fixing tests * fix doctest
This commit is contained in:
committed by
Arkadiy Paronyan
parent
8d0e05adb7
commit
44bc8a08fb
@@ -33,7 +33,7 @@ const POLL_TIMEOUT: isize = 100;
|
||||
const CLIENT_CONNECTION_TIMEOUT: isize = 2500;
|
||||
|
||||
/// Generic worker to handle service (binded) sockets
|
||||
pub struct Worker<S> where S: IpcInterface<S> {
|
||||
pub struct Worker<S: ?Sized> where Arc<S>: IpcInterface<S> {
|
||||
service: Arc<S>,
|
||||
sockets: Vec<(Socket, Endpoint)>,
|
||||
polls: Vec<PollFd>,
|
||||
@@ -116,7 +116,7 @@ pub enum SocketError {
|
||||
RequestLink,
|
||||
}
|
||||
|
||||
impl<S> Worker<S> where S: IpcInterface<S> {
|
||||
impl<S: ?Sized> Worker<S> where Arc<S>: IpcInterface<S> {
|
||||
/// New worker over specified `service`
|
||||
pub fn new(service: &Arc<S>) -> Worker<S> {
|
||||
Worker::<S> {
|
||||
|
||||
Reference in New Issue
Block a user