mirror of https://github.com/smol-rs/async-net
Compare commits
6 Commits
8b199ead8f
...
8d56482050
Author | SHA1 | Date |
---|---|---|
Taiki Endo | 8d56482050 | |
Taiki Endo | 50ee731758 | |
Taiki Endo | 3af3edb76c | |
Taiki Endo | 164443584b | |
Taiki Endo | a5b175921b | |
Taiki Endo | 583df1640c |
|
@ -1,3 +1,8 @@
|
|||
# Version 1.6.1
|
||||
|
||||
- Override `AsyncWrite::poll_write_vectored` for `TcpStream`.
|
||||
- Remove boxed futures from `TcpStream` and `UnixStream`.
|
||||
|
||||
# Version 1.6.0
|
||||
|
||||
- Add `From` impls for conversion into inner networking types `Arc<Async<T>>`. (#12)
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "async-net"
|
|||
# When publishing a new version:
|
||||
# - Update CHANGELOG.md
|
||||
# - Create "v1.x.y" git tag
|
||||
version = "1.6.0"
|
||||
version = "1.6.1"
|
||||
authors = ["Stjepan Glavina <stjepang@gmail.com>"]
|
||||
edition = "2018"
|
||||
description = "Async networking primitives for TCP/UDP/Unix communication"
|
||||
|
@ -15,7 +15,6 @@ keywords = ["networking", "uds", "mio", "reactor", "std"]
|
|||
categories = ["asynchronous", "network-programming", "os"]
|
||||
|
||||
[dependencies]
|
||||
async-io = "1.5.0"
|
||||
async-io = "1.6.0"
|
||||
blocking = "1.0.0"
|
||||
fastrand = "1.3.5"
|
||||
futures-lite = "1.11.0"
|
||||
|
|
12
src/tcp.rs
12
src/tcp.rs
|
@ -303,8 +303,8 @@ impl fmt::Debug for Incoming<'_> {
|
|||
/// ```
|
||||
pub struct TcpStream {
|
||||
inner: Arc<Async<std::net::TcpStream>>,
|
||||
readable: Option<async_io::Readable>,
|
||||
writable: Option<async_io::Writable>,
|
||||
readable: Option<async_io::ReadableOwned<std::net::TcpStream>>,
|
||||
writable: Option<async_io::WritableOwned<std::net::TcpStream>>,
|
||||
}
|
||||
|
||||
impl UnwindSafe for TcpStream {}
|
||||
|
@ -599,7 +599,7 @@ impl AsyncRead for TcpStream {
|
|||
|
||||
// Initialize the future to wait for readiness.
|
||||
if self.readable.is_none() {
|
||||
self.readable = Some(self.inner.readable());
|
||||
self.readable = Some(self.inner.clone().readable_owned());
|
||||
}
|
||||
|
||||
// Poll the future for readiness.
|
||||
|
@ -630,7 +630,7 @@ impl AsyncWrite for TcpStream {
|
|||
|
||||
// Initialize the future to wait for readiness.
|
||||
if self.writable.is_none() {
|
||||
self.writable = Some(self.inner.writable());
|
||||
self.writable = Some(self.inner.clone().writable_owned());
|
||||
}
|
||||
|
||||
// Poll the future for readiness.
|
||||
|
@ -655,7 +655,7 @@ impl AsyncWrite for TcpStream {
|
|||
|
||||
// Initialize the future to wait for readiness.
|
||||
if self.writable.is_none() {
|
||||
self.writable = Some(self.inner.writable());
|
||||
self.writable = Some(self.inner.clone().writable_owned());
|
||||
}
|
||||
|
||||
// Poll the future for readiness.
|
||||
|
@ -688,7 +688,7 @@ impl AsyncWrite for TcpStream {
|
|||
|
||||
// Initialize the future to wait for readiness.
|
||||
if self.writable.is_none() {
|
||||
self.writable = Some(self.inner.writable());
|
||||
self.writable = Some(self.inner.clone().writable_owned());
|
||||
}
|
||||
|
||||
// Poll the future for readiness.
|
||||
|
|
10
src/unix.rs
10
src/unix.rs
|
@ -234,8 +234,8 @@ impl fmt::Debug for Incoming<'_> {
|
|||
/// ```
|
||||
pub struct UnixStream {
|
||||
inner: Arc<Async<std::os::unix::net::UnixStream>>,
|
||||
readable: Option<async_io::Readable>,
|
||||
writable: Option<async_io::Writable>,
|
||||
readable: Option<async_io::ReadableOwned<std::os::unix::net::UnixStream>>,
|
||||
writable: Option<async_io::WritableOwned<std::os::unix::net::UnixStream>>,
|
||||
}
|
||||
|
||||
impl UnwindSafe for UnixStream {}
|
||||
|
@ -396,7 +396,7 @@ impl AsyncRead for UnixStream {
|
|||
|
||||
// Initialize the future to wait for readiness.
|
||||
if self.readable.is_none() {
|
||||
self.readable = Some(self.inner.readable());
|
||||
self.readable = Some(self.inner.clone().readable_owned());
|
||||
}
|
||||
|
||||
// Poll the future for readiness.
|
||||
|
@ -427,7 +427,7 @@ impl AsyncWrite for UnixStream {
|
|||
|
||||
// Initialize the future to wait for readiness.
|
||||
if self.writable.is_none() {
|
||||
self.writable = Some(self.inner.writable());
|
||||
self.writable = Some(self.inner.clone().writable_owned());
|
||||
}
|
||||
|
||||
// Poll the future for readiness.
|
||||
|
@ -452,7 +452,7 @@ impl AsyncWrite for UnixStream {
|
|||
|
||||
// Initialize the future to wait for readiness.
|
||||
if self.writable.is_none() {
|
||||
self.writable = Some(self.inner.writable());
|
||||
self.writable = Some(self.inner.clone().writable_owned());
|
||||
}
|
||||
|
||||
// Poll the future for readiness.
|
||||
|
|
Loading…
Reference in New Issue