1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-08-13 03:48:23 +02:00

Compare commits

...

7 Commits

Author SHA1 Message Date
Rob Ede
217cbd2228 bump tokio-util to 0.7 (#446) 2022-02-15 01:47:27 +00:00
Rob Ede
d229c1e886 fix min ver check 2022-02-12 08:42:13 +00:00
Rob Ede
6792f799a6 add minimal-versions check 2022-02-12 08:37:56 +00:00
Rob Ede
72481313cc update readme 2022-01-28 22:28:24 +00:00
Rob Ede
59b629c74b fix deps badge 2022-01-28 22:17:12 +00:00
Rob Ede
7988694242 update msrv info 2022-01-28 22:15:16 +00:00
Rob Ede
b8a7741524 fix bind_addr 2022-01-28 22:13:10 +00:00
11 changed files with 69 additions and 20 deletions

View File

@@ -124,7 +124,7 @@ jobs:
- name: Install Rust (nightly)
uses: actions-rs/toolchain@v1
with:
toolchain: stable-x86_64-unknown-linux-gnu
toolchain: nightly
profile: minimal
override: true
@@ -143,3 +143,40 @@ jobs:
if: github.ref == 'refs/heads/master'
uses: codecov/codecov-action@v1
with: { file: cobertura.xml }
minimal-versions:
name: minimal versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust (nightly)
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with: { command: generate-lockfile }
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1.3.0
- name: Install cargo-minimal-versions
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-minimal-versions
- name: Install cargo-hack
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-hack
- name: Check With Minimal Versions
uses: actions-rs/cargo@v1
with:
command: minimal-versions
args: check

View File

@@ -2,18 +2,19 @@
> A collection of lower-level libraries for composable network services.
[![CI](https://github.com/actix/actix-net/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/actix/actix-net/actions/workflows/ci.yml)
[![CI](https://github.com/actix/actix-net/actions/workflows/ci.yml/badge.svg?event=push&style=flat-square)](https://github.com/actix/actix-net/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/actix/actix-net/branch/master/graph/badge.svg)](https://codecov.io/gh/actix/actix-net)
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)
[![Dependency Status](https://deps.rs/repo/github/actix/actix-extras/status.svg)](https://deps.rs/repo/github/actix/actix-extras)
[![Dependency Status](https://deps.rs/repo/github/actix/actix-net/status.svg)](https://deps.rs/repo/github/actix/actix-net)
## Example
## Examples
See `actix-server/examples` and `actix-tls/examples` for some basic examples.
See example folders for [`actix-server`](./actix-server/examples) and [`actix-tls`](./actix-tls/examples).
### MSRV
This repo's Minimum Supported Rust Version (MSRV) is 1.46.0.
Most crates in this repo's have a Minimum Supported Rust Version (MSRV) of 1.46.0. Only `actix-tls`
and `actix-server` have MSRV of 1.52.0.
## License

View File

@@ -3,6 +3,12 @@
## Unreleased - 2021-xx-xx
## 0.5.0 - 2022-02-15
- Updated `tokio-util` dependency to `0.7.0`. [#446]
[#446]: https://github.com/actix/actix-net/pull/446
## 0.4.2 - 2021-12-31
- No significant changes since `0.4.1`.

View File

@@ -1,6 +1,6 @@
[package]
name = "actix-codec"
version = "0.4.2"
version = "0.5.0"
authors = [
"Nikolay Kim <fafhrd91@gmail.com>",
"Rob Ede <robjtede@icloud.com>",
@@ -17,7 +17,7 @@ name = "actix_codec"
path = "src/lib.rs"
[dependencies]
bitflags = "1.2.1"
bitflags = "1.2"
bytes = "1"
futures-core = { version = "0.3.7", default-features = false }
futures-sink = { version = "0.3.7", default-features = false }
@@ -25,7 +25,7 @@ log = "0.4"
memchr = "2.3"
pin-project-lite = "0.2"
tokio = "1.13.1"
tokio-util = { version = "0.6", features = ["codec", "io"] }
tokio-util = { version = "0.7", features = ["codec", "io"] }
[dev-dependencies]
criterion = { version = "0.3", features = ["html_reports"] }

View File

@@ -7,8 +7,8 @@ use super::{Decoder, Encoder};
/// Lines codec. Reads/writes line delimited strings.
///
/// Will split input up by LF or CRLF delimiters. I.e. carriage return characters at the end of
/// lines are not preserved.
/// Will split input up by LF or CRLF delimiters. Carriage return characters at the end of lines are
/// not preserved.
#[derive(Debug, Copy, Clone, Default)]
#[non_exhaustive]
pub struct LinesCodec;

View File

@@ -35,4 +35,4 @@ tokio-uring = { version = "0.2", optional = true }
[dev-dependencies]
tokio = { version = "1.13.1", features = ["full"] }
hyper = { version = "0.14", default-features = false, features = ["server", "tcp", "http1"] }
hyper = { version = "0.14.10", default-features = false, features = ["server", "tcp", "http1"] }

View File

@@ -41,7 +41,7 @@ tokio = { version = "1.13.1", features = ["sync"] }
tokio-uring = { version = "0.2", optional = true }
[dev-dependencies]
actix-codec = "0.4.2"
actix-codec = "0.5.0"
actix-rt = "2.6.0"
bytes = "1"

View File

@@ -264,22 +264,23 @@ pub(super) fn bind_addr<S: ToSocketAddrs>(
addr: S,
backlog: u32,
) -> io::Result<Vec<MioTcpListener>> {
let mut err = None;
let mut opt_err = None;
let mut success = false;
let mut sockets = Vec::new();
for addr in addr.to_socket_addrs()? {
match create_mio_tcp_listener(addr, backlog) {
Ok(lst) => {
success = true;
sockets.push(lst);
}
Err(err) => err = Some(err),
Err(err) => opt_err = Some(err),
}
}
if success {
Ok(sockets)
} else if let Some(err) = err.take() {
} else if let Some(err) = opt_err.take() {
Err(err)
} else {
Err(io::Error::new(

View File

@@ -3,6 +3,10 @@
## Unreleased - 2021-xx-xx
## 3.0.3 - 2022-02-15
- No significant changes since `3.0.2`.
## 3.0.2 - 2022-01-28
- Expose `connect::Connection::new`. [#439]

View File

@@ -1,6 +1,6 @@
[package]
name = "actix-tls"
version = "3.0.2"
version = "3.0.3"
authors = [
"Nikolay Kim <fafhrd91@gmail.com>",
"Rob Ede <robjtede@icloud.com>",
@@ -42,7 +42,7 @@ native-tls = ["tokio-native-tls"]
uri = ["http"]
[dependencies]
actix-codec = "0.4.2"
actix-codec = "0.5.0"
actix-rt = { version = "2.2.0", default-features = false }
actix-service = "2.0.0"
actix-utils = "3.0.0"
@@ -50,7 +50,7 @@ actix-utils = "3.0.0"
futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
log = "0.4"
pin-project-lite = "0.2.7"
tokio-util = { version = "0.6.3", default-features = false }
tokio-util = "0.7"
# uri
http = { version = "0.2.3", optional = true }

View File

@@ -79,7 +79,7 @@ pub enum TcpConnectorFut<R> {
port: u16,
local_addr: Option<IpAddr>,
addrs: Option<VecDeque<SocketAddr>>,
stream: ReusableBoxFuture<Result<TcpStream, io::Error>>,
stream: ReusableBoxFuture<'static, Result<TcpStream, io::Error>>,
},
Error(Option<ConnectError>),