diff --git a/README.md b/README.md index 5b51e6a8f986d6a37159c3ec8b5db17405c97664..8300707caa2cc85574ab0ebccf8926279397641b 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,6 @@ This repository might be helpful for you! # Prerequisites -- Some basic understanding of writing async rust code. Alhough you can opt to write your application code in a synchronous manner, we opt to use it here to handle events. +- Some basic understanding of writing async rust code. Although you can still write your application code in a synchronous manner, we opt to use it here to simplify the handling of network events. -- A familiarity with the actor model/pattern of writing async code. \ No newline at end of file +- A familiarity with the actor model/pattern of writing async code (see [here](https://ryhl.io/blog/actors-with-tokio/) for a good starting point). \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 962139adc08044dce009b097cb69f1bf0c68ee85..9232eac8258c703f6e607663be85bbc965106206 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,6 +8,6 @@ pub trait Network { /// Send a message to the identifier specified by the 'to' field. fn send(&mut self, to: &str, message: Vec<u8>); - /// Wait for a message to be received + /// Generate one or more receivers to catch inbound messages. async fn recv(&mut self) -> mpsc::Receiver<(String, Vec<u8>)>; } \ No newline at end of file