Use macros for proxying internal interfaces.

This commit is contained in:
Oliver Gould
2017-07-23 19:18:14 +00:00
parent df5f31a63c
commit 5b3f27c5fa
11 changed files with 330 additions and 694 deletions

View File

@@ -1,15 +1,6 @@
use ConnectionError;
use frame::{Frame, Ping, SettingSet};
use proto::{ApplySettings, ReadySink};
use futures::*;
pub type PingPayload = [u8; 8];
pub trait ControlPing {
fn start_ping(&mut self, body: PingPayload) -> StartSend<PingPayload, ConnectionError>;
fn take_pong(&mut self) -> Option<PingPayload>;
}
use proto::*;
/// Acknowledges ping requests from the remote.
#[derive(Debug)]