mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
aquatic_ws: mio: replace native_tls with rustls, rewrite connection state logic completely (#38)
* ws: mio: use rustls, rewrite Connection logic * ws: mio: improve poll register/deregister handling * ws: mio: work on type-level poll registry safety * ws: mio: use stronger poll registry type-level guarantees * ws: mio: fix stream reading * ws: clean up, run fmt * ws: mio: don't require registered connection for writing, improve docs * ws: mio: add Connection::get_meta(), make Connection::meta private * ws: mio: add ConnectionMap struct; remove utils.rs * ws: mio: move token counter into ConnectionMap, improve docs * ws: mio: connection: move Connection struct above state structs * Update TODO * ws: fix build errors * ws: upgrade to tungstenite 0.16 * ws load test: don't panic on Close message; print shorter errors * ws: fix socket worker bugs, add log statements * ws: mio: wait for write availability if would block for ws messages * Update README * ws: mio: limit channels & queues; read 1 message only; other fixes * ws: mio: send local responses each event; decrease channel size * Update TODO * ws: mio: limit ws send queue, fixing memory leak; limit pending messages Also change some log output levels and run rustfmt * Update TODO * Update TODO
This commit is contained in:
parent
222fac0e09
commit
67c4c02bbd
13 changed files with 893 additions and 776 deletions
|
|
@ -16,8 +16,8 @@ name = "aquatic_ws"
|
|||
[features]
|
||||
default = ["with-mio"]
|
||||
cpu-pinning = ["aquatic_common/cpu-pinning"]
|
||||
with-glommio = ["cpu-pinning", "async-tungstenite", "futures-lite", "futures", "futures-rustls", "glommio", "rustls-pemfile"]
|
||||
with-mio = ["crossbeam-channel", "histogram", "mio", "native-tls", "parking_lot", "socket2"]
|
||||
with-glommio = ["cpu-pinning", "async-tungstenite", "futures-lite", "futures", "futures-rustls", "glommio"]
|
||||
with-mio = ["crossbeam-channel", "histogram", "mio", "parking_lot", "socket2"]
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1"
|
||||
|
|
@ -31,6 +31,8 @@ log = "0.4"
|
|||
mimalloc = { version = "0.1", default-features = false }
|
||||
privdrop = "0.5"
|
||||
rand = { version = "0.8", features = ["small_rng"] }
|
||||
rustls = "0.20"
|
||||
rustls-pemfile = "0.2"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
signal-hook = { version = "0.3" }
|
||||
slab = "0.4"
|
||||
|
|
@ -40,7 +42,6 @@ tungstenite = "0.16"
|
|||
crossbeam-channel = { version = "0.5", optional = true }
|
||||
histogram = { version = "0.6", optional = true }
|
||||
mio = { version = "0.8", features = ["net", "os-poll"], optional = true }
|
||||
native-tls = { version = "0.2", optional = true }
|
||||
parking_lot = { version = "0.11", optional = true }
|
||||
socket2 = { version = "0.4", features = ["all"], optional = true }
|
||||
|
||||
|
|
@ -50,7 +51,6 @@ futures-lite = { version = "1", optional = true }
|
|||
futures = { version = "0.3", optional = true }
|
||||
futures-rustls = { version = "0.22", optional = true }
|
||||
glommio = { git = "https://github.com/DataDog/glommio.git", rev = "2efe2f2a08f54394a435b674e8e0125057cbff03", optional = true }
|
||||
rustls-pemfile = { version = "0.2", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
quickcheck = "1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue