12 Commits

Author SHA1 Message Date
Roman
025f52aadc Fix UdpCodec::encode (#85)
*     Refactor UDP SendDgram & RecvDgram

    Get rid of unnamed structs in the favor of private structs with named fields

*     Change the signature of UdpCodec::encode

    Now it is:

    ```
        fn encode(&mut self, msg: Self::Out, buf: &mut Vec<u8>) -> Result<SocketAddr, Self::Error>;
    ```

    Closes https://github.com/tokio-rs/tokio/issues/79

* Fix compilation error from `mio` crate
2018-01-16 08:49:59 -08:00
Alex Crichton
4ef772b2db Remove Handle argument from I/O constructors (#61)
This commit removes the `Handle` argument from the following constructors

* `TcpListener::bind`
* `TcpStream::connect`
* `UdpSocket::bind`

The `Handle` argument remains on the various `*_std` constructors as they're
more low-level, but this otherwise is intended to set forth a precedent of by
default not taking `Handle` arguments and instead relying on the global
`Handle::default` return value when necesary.
2017-12-12 18:32:50 -06:00
Alex Crichton
a577bfc033 Remove the Reactor::run method (#58)
This commit removes the `Reactor::run` method which has previously been used to
execute futures and turn the reactor at the same time. The tests/examples made
heavy usage of this method but they have now all temporarily moved to `wait()`
until the futures dependency is upgraded. In the meantime this'll allow us to
further trim down the `Reactor` APIs to their final state.
2017-12-11 21:29:18 -06:00
Alex Crichton
108e1a2c1a Blanket rename Core to Reactor
This commit uses a script to rename `Core` to `Reactor` all at once, notably:

    find . -name '*.rs' | xargs sed -i 's/\bCore\b/Reactor/g'
2017-12-05 09:02:07 -08:00
Carl Lerche
c6f1ff13d2 Remove executor from reactor.
In accordance with tokio-rs/tokio-rfcs#3, the executor functionality of
Tokio is being removed and will be relocated into futures-rs as a
"current thread" executor.

This PR removes task execution from the code base. As a temporary
mesure, all examples and tests are switched to using CpuPool.

Depends on #19.
2017-11-01 07:28:49 -07:00
Carl Lerche
36aaaa1520 Rename crate to tokio 2017-10-30 16:37:00 -07:00
Alex Crichton
85257e19af Touch up a few examples 2017-09-11 08:43:11 -07:00
Alex Crichton
a611f6ec30 Add a UDP mode to the connect example 2017-09-11 08:33:09 -07:00
Alex Crichton
89fcc96dd4 Migrate to using tokio-io
Deprecate the existing `io` module in this crate entirely.

More details coming soon!

Closes #61
2017-03-15 09:46:54 -07:00
Justin Mayhew
c9a8208c8a Rename sender in connect example 2017-02-19 15:02:31 -04:00
Alex Crichton
717e99ca80 Fix connect example 2016-12-20 18:39:44 -08:00
Alex Crichton
99078c5cc1 Touch up comments on echo, add connect example 2016-12-20 17:59:46 -08:00