Add example of detecting client drops in bidirectional streams on server side (#931)

This commit is contained in:
Sylwester Rąpała
2022-03-03 11:50:43 -05:00
committed by GitHub
parent e30bb7ede7
commit 01e5be5080
3 changed files with 174 additions and 43 deletions
+15 -12
View File
@@ -180,37 +180,40 @@ path = "src/streaming/server.rs"
[dependencies]
async-stream = "0.3"
futures = {version = "0.3", default-features = false, features = ["alloc"]}
futures = { version = "0.3", default-features = false, features = ["alloc"] }
prost = "0.9"
tokio = {version = "1.0", features = ["rt-multi-thread", "time", "fs", "macros", "net"]}
tokio-stream = {version = "0.1", features = ["net"]}
tonic = {path = "../tonic", features = ["tls", "compression"]}
tower = {version = "0.4"}
tokio = { version = "1.0", features = [ "rt-multi-thread", "time", "fs", "macros", "net",] }
tokio-stream = { version = "0.1", features = ["net"] }
tonic = { path = "../tonic", features = ["tls", "compression"] }
tower = { version = "0.4" }
# Required for routeguide
rand = "0.8"
serde = {version = "1.0", features = ["derive"]}
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# Tracing
tracing = "0.1.16"
tracing-attributes = "0.1"
tracing-futures = "0.2"
tracing-subscriber = {version = "0.3", features = ["tracing-log"]}
tracing-subscriber = { version = "0.3", features = ["tracing-log"] }
# Required for wellknown types
prost-types = "0.9"
# Hyper example
http = "0.2"
http-body = "0.4.2"
hyper = {version = "0.14", features = ["full"]}
hyper = { version = "0.14", features = ["full"] }
pin-project = "1.0"
warp = "0.3"
# Health example
tonic-health = {path = "../tonic-health"}
tonic-health = { path = "../tonic-health" }
# Reflection example
listenfd = "0.3"
tonic-reflection = {path = "../tonic-reflection"}
tonic-reflection = { path = "../tonic-reflection" }
# grpc-web example
bytes = "1"
tonic-web = {path = "../tonic-web"}
tonic-web = { path = "../tonic-web" }
# streaming example
h2 = "0.3"
[build-dependencies]
tonic-build = {path = "../tonic-build", features = ["prost", "compression"]}
tonic-build = { path = "../tonic-build", features = ["prost", "compression"] }