This commit is contained in:
Ondrej Babec
2022-03-09 09:14:37 +01:00
parent ff287dc451
commit edb07d94d3
50 changed files with 2144 additions and 99 deletions

View File

@@ -24,6 +24,10 @@ pub trait Network {
where
Self: 'm;
type TimerFuture<'m>: Future<Output = ()>
where
Self: 'm;
fn new(ip: [u8; 4], port: u16) -> Self;
fn create_connection(&'m mut self) -> Self::ConnectionFuture<'m>;
@@ -31,4 +35,6 @@ pub trait Network {
fn send(&'m mut self, buffer: &'m mut [u8], len: usize) -> Self::WriteFuture<'m>;
fn receive(&'m mut self, buffer: &'m mut [u8]) -> Self::ReadFuture<'m>;
fn count_down(&'m mut self, time_in_secs: u64) -> Self::TimerFuture<'m>;
}