summaryrefslogtreecommitdiffstats
path: root/examples
AgeCommit message (Collapse)Author
2016-11-22Touch up examples to ensure consistencyAlex Crichton
2016-11-22Touch up codes for UDPAlex Crichton
* Move to `std::net` as it's all purely UDP related * Rename to `UdpCodec` and `UdpFramed` to give a consistent `Udp` prefix * Add `RecvDgram`, rename `SendDGram` to `SendDgram` * Touch up some style here and there
2016-11-22changed CodecUdp::decode to return Self::In instead of Option<Self::In>Rick Richardson
2016-11-21made send_dgram move self, made FramedUdp::new private, other clean-ups and ↵Rick Richardson
tweaks
2016-11-20forgot a =Rick Richardson
2016-11-20moved udp test to examples, optimized buffer handlingRick Richardson
2016-11-18Deprecate the `channel` moduleAlex Crichton
The `futures::sync::mpsc` module should entirely supplant it.
2016-11-09This works only for IPv4 addressesKartik Singhal
2016-11-09Correct client invocation exampleKartik Singhal
2016-11-05No more need for lazy in chat exampleAlex Crichton
2016-11-05Simply echo example: split() can now happen on the main task.David Renshaw
2016-11-02Touch up the echo examplesAlex Crichton
2016-11-02Add UDP echo server example.Dawid Ciężarkiewicz
2016-10-14fix(examples): Fix typos in chat exampleoberien
Rephrase a sentence to not contain the word `join` when we are actually using `select` to prevent confusion.
2016-10-13Touch up the chat exampleAlex Crichton
2016-10-11ref(examples): Minor refactoring in chat exampleoberien
* Move connections-clone down a bit * Use `Ok` and `Err` as IntoFuture
2016-10-07ref(chat): Make code more readableoberien
* Send source address of message in addition to the message to connected clients. * Move `spawn_fn` to the bottom. * Use `map` instead of `and_then` if there is no need for blocking. * `map` to unit where values are not needed anymore.
2016-10-06fix(chat): Implement alexcrichton's suggestionsoberien
* Remove unnecessary clone * Improve rightward drift * Remove unnecessary lazy future * Improve utf-8 handling * Refactor to make code more understandable
2016-10-04Add Chat exampleoberien
2016-09-20Instead of calling handle() a second time in line 26, I used a reference to ↵xenor
the value obtained in line 23.
2016-09-09Add a simple "hello" exampleAlex Crichton
2016-09-07Swap Handle/PinnedAlex Crichton
* Handle -> Remote * Pinned -> Handle All APIs now take a `&Handle` by default and in general can return an immediate `io::Result` instead of an `IoFuture`. This reflects how most usage will likely be done through handles rather than remotes, and also all previous functionality can be recovered with a `oneshot` plus `Remote::spawn`. Closes #15
2016-09-07Tweak TaskIo wording and suchAlex Crichton
* Remove TaskIo * task_split -> split * TaskIoRead -> ReadHalf * TaskIoWrite -> WriteHalf Closes #18
2016-09-07Reorganize the entire crate:Alex Crichton
Renamed APIs * Loop => reactor::Core * LoopHandle => reactor::Handle * LoopPin => reactor::Pinned * TcpStream => net::TcpStream * TcpListener => net::TcpListener * UdpSocket => net::UdpSocket * Sender => channel::Sender * Receiver => channel::Receiver * Timeout => reactor::Timeout * ReadinessStream => reactor::PollEvented * All `LoopHandle` methods to construct objects are now free functions on the associated types, e.g. `LoopHandle::tcp_listen` is now `TcpListener::bind` * All APIs taking a `Handle` now take a `Handle` as the last argument * All future-returning APIs now return concrete types instead of trait objects Added APIs * io::Io trait -- Read + Write + ability to poll Removed without replacement: * AddSource * AddTimeout * IoToken * TimeoutToken Closes #3 Closes #6
2016-09-01Move binaries to examplesAlex Crichton