Home
last modified time | relevance | path

Searched refs:tokio (Results 1 – 25 of 121) sorted by relevance

12345

/tonic/examples/src/dynamic_load_balance/
H A Dclient.rs13 use tokio::time::timeout;
15 #[tokio::main]
25 tokio::spawn(async move { in main()
26 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await; in main()
31 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await; in main()
36 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await; in main()
42 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await; in main()
48 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await; in main()
55 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await; in main()
64 tokio::time::sleep(tokio::time::Duration::from_millis(500)).await; in main()
[all …]
H A Dserver.rs6 use tokio::sync::mpsc;
27 #[tokio::main]
42 tokio::spawn(async move { in main()
/tonic/
H A DSECURITY.md3 tonic (and related projects in hyperium) uses the same security policy as the [Tokio project][tokio…
7 …n issue is the same as the [Tokio project][tokio-security]. This includes private reporting via se…
9 [tokio-security]: https://github.com/tokio-rs/tokio/security/policy
/tonic/tonic/
H A DCargo.toml32 _tls-any = ["dep:tokio-rustls", "dep:tokio", "tokio?/rt", "tokio?/macros"] # Internal. Please choos…
33 tls-ring = ["_tls-any", "tokio-rustls/ring"]
34 tls-aws-lc = ["_tls-any", "tokio-rustls/aws-lc-rs"]
43 "dep:tokio", "tokio?/macros", "tokio?/net", "tokio?/time",
44 "tokio-stream/net",
51 "dep:tokio", "tokio?/time",
72 tokio-stream = {version = "0.1.16", default-features = false}
83 hyper-util = { version = "0.1.4", features = ["tokio"], optional = true }
85 tokio = {version = "1", default-features = false, optional = true}
107 tokio = {version = "1.0", features = ["rt", "macros"]}
[all …]
/tonic/tests/integration_tests/tests/
H A Dconnection.rs4 use tokio::{net::TcpListener, sync::oneshot};
22 #[tokio::test]
29 #[tokio::test]
37 #[tokio::test]
47 let jh = tokio::spawn(async move { in connect_returns_err_via_call_after_connected()
55 tokio::time::sleep(Duration::from_millis(100)).await; in connect_returns_err_via_call_after_connected()
62 tokio::time::sleep(Duration::from_millis(100)).await; in connect_returns_err_via_call_after_connected()
72 #[tokio::test]
91 let jh = tokio::spawn(async move { in connect_lazy_reconnects_after_first_failure()
105 tokio::time::sleep(Duration::from_millis(100)).await; in connect_lazy_reconnects_after_first_failure()
[all …]
H A Dhttp2_keep_alive.rs3 use tokio::{net::TcpListener, sync::oneshot};
18 #[tokio::test]
27 let jh = tokio::spawn(async move { in http2_keepalive_does_not_cause_panics()
36 tokio::time::sleep(Duration::from_millis(100)).await; in http2_keepalive_does_not_cause_panics()
48 #[tokio::test]
57 let jh = tokio::spawn(async move { in http2_keepalive_does_not_cause_panics_on_client_side()
66 tokio::time::sleep(Duration::from_millis(100)).await; in http2_keepalive_does_not_cause_panics_on_client_side()
H A Dstatus.rs11 use tokio::{net::TcpListener, sync::oneshot};
18 #[tokio::test]
41 let jh = tokio::spawn(async move { in status_with_details()
49 tokio::time::sleep(Duration::from_millis(100)).await; in status_with_details()
68 #[tokio::test]
99 let jh = tokio::spawn(async move { in status_with_metadata()
142 #[tokio::test]
170 tokio::spawn(async move { in status_from_server_stream()
194 #[tokio::test]
212 #[tokio::test]
[all …]
H A Dhttp2_max_header_list_size.rs4 use tokio::sync::oneshot;
12 #[tokio::test]
33 let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap(); in test_http_max_header_list_size_and_long_errors()
36 let jh = tokio::spawn(async move { in test_http_max_header_list_size_and_long_errors()
49 tokio::time::sleep(Duration::from_millis(100)).await; in test_http_max_header_list_size_and_long_errors()
H A Dtimeout.rs3 use tokio::net::TcpListener;
6 #[tokio::test]
26 #[tokio::test]
45 #[tokio::test]
72 tokio::time::sleep(self.latency).await; in run_service_in_background()
82 tokio::spawn(async move { in run_service_in_background()
H A Dconnect_info.rs3 use tokio::{net::TcpListener, sync::oneshot};
12 #[tokio::test]
35 let jh = tokio::spawn(async move { in getting_connect_info()
43 tokio::time::sleep(Duration::from_millis(100)).await; in getting_connect_info()
65 use tokio::{
96 #[tokio::test]
107 let jh = tokio::spawn(async move { in getting_connect_info()
H A Duser_agent.rs3 use tokio::{net::TcpListener, sync::oneshot};
9 #[tokio::test]
31 let jh = tokio::spawn(async move { in writes_user_agent_header()
39 tokio::time::sleep(Duration::from_millis(100)).await; in writes_user_agent_header()
H A Dinterceptor.rs3 use tokio::{net::TcpListener, sync::oneshot};
9 #[tokio::test]
31 let jh = tokio::spawn(async move { in interceptor_retrieves_grpc_method()
54 tokio::time::sleep(Duration::from_millis(100)).await; in interceptor_retrieves_grpc_method()
H A Dextensions.rs9 use tokio::{net::TcpListener, sync::oneshot};
21 #[tokio::test]
46 let jh = tokio::spawn(async move { in setting_extension_from_interceptor()
54 tokio::time::sleep(Duration::from_millis(100)).await; in setting_extension_from_interceptor()
71 #[tokio::test]
95 let jh = tokio::spawn(async move { in setting_extension_from_tower()
103 tokio::time::sleep(Duration::from_millis(100)).await; in setting_extension_from_tower()
H A Dclient_layer.rs4 use tokio::{net::TcpListener, sync::oneshot};
12 #[tokio::test]
34 let jh = tokio::spawn(async move { in connect_supports_standard_tower_layers()
58 tokio::time::sleep(Duration::from_millis(100)).await; in connect_supports_standard_tower_layers()
/tonic/tonic-reflection/tests/
H A Dversions.rs5 use tokio::sync::oneshot;
12 #[tokio::test]
36 #[tokio::test]
67 let listener = tokio::net::TcpListener::bind(addr).await.expect("bind"); in make_v1_request()
69 let jh = tokio::spawn(async move { in make_v1_request()
82 tokio::time::sleep(std::time::Duration::from_millis(100)).await; in make_v1_request()
124 let listener = tokio::net::TcpListener::bind(addr).await.expect("bind"); in make_v1alpha_request()
126 let jh = tokio::spawn(async move { in make_v1alpha_request()
139 tokio::time::sleep(std::time::Duration::from_millis(100)).await; in make_v1alpha_request()
H A Dserver.rs5 use tokio::sync::oneshot;
27 #[tokio::test]
47 #[tokio::test]
71 #[tokio::test]
100 let listener = tokio::net::TcpListener::bind(addr).await.expect("bind"); in make_test_reflection_request()
102 let jh = tokio::spawn(async move { in make_test_reflection_request()
118 tokio::time::sleep(std::time::Duration::from_millis(100)).await; in make_test_reflection_request()
/tonic/tonic/src/transport/server/
H A Dunix.rs15 pub peer_addr: Option<Arc<tokio::net::unix::SocketAddr>>,
17 pub peer_cred: Option<tokio::net::unix::UCred>,
20 impl Connected for tokio::net::UnixStream {
/tonic/examples/src/cancellation/
H A Dserver.rs9 use tokio::select;
10 use tokio::time::sleep;
11 use tokio::time::Duration;
60 let select_task = tokio::spawn(async move { in with_cancellation_handler()
72 #[tokio::main]
/tonic/tonic-reflection/
H A DCargo.toml26 server = ["dep:prost-types", "dep:tokio", "dep:tokio-stream"]
32 tokio = { version = "1.0", features = ["sync", "rt"], optional = true }
33 tokio-stream = {version = "0.1", default-features = false, optional = true }
37 tokio-stream = {version = "0.1", default-features = false, features = ["net"]}
/tonic/tests/compression/src/
H A Dutil.rs15 use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
25 #[tokio::test(flavor = "multi_thread")]
88 rx: tokio::sync::mpsc::Receiver<Frame<T>>,
92 pub fn new() -> (tokio::sync::mpsc::Sender<Frame<T>>, Self) { in new()
93 let (tx, rx) = tokio::sync::mpsc::channel(32); in new()
122 tokio::spawn(async move { in measure_request_body_size_layer()
136 pub async fn mock_io_channel(client: tokio::io::DuplexStream) -> Channel { in mock_io_channel()
H A Dcompressing_response.rs13 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_enabled_server_enabled()
59 tokio::spawn({ in client_enabled_server_enabled()
111 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_enabled_server_disabled()
117 tokio::spawn({ in client_enabled_server_disabled()
150 #[tokio::test(flavor = "multi_thread")]
158 tokio::spawn({ in client_enabled_server_disabled_multi_encoding()
232 tokio::spawn({ in client_disabled()
284 tokio::spawn(async move { in server_replying_with_unsupported_encoding()
326 tokio::spawn({ in disabling_compression_on_single_response()
384 tokio::spawn({ in disabling_compression_on_response_but_keeping_compression_on_stream()
[all …]
H A Dcompressing_request.rs14 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_enabled_server_enabled()
44 tokio::spawn({ in client_enabled_server_enabled()
91 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_enabled_server_enabled_multi_encoding()
108 tokio::spawn({ in client_enabled_server_enabled_multi_encoding()
153 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_enabled_server_disabled()
157 tokio::spawn(async move { in client_enabled_server_disabled()
204 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_mark_compressed_without_header_server_enabled()
208 tokio::spawn({ in client_mark_compressed_without_header_server_enabled()
H A Dserver_stream.rs14 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_enabled_server_enabled()
20 tokio::spawn({ in client_enabled_server_enabled()
79 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_disabled_server_enabled()
85 tokio::spawn({ in client_disabled_server_enabled()
131 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_enabled_server_disabled()
137 tokio::spawn({ in client_enabled_server_disabled()
/tonic/tests/web/tests/
H A Dgrpc.rs4 use tokio::net::TcpListener;
5 use tokio::time::Duration;
6 use tokio::{join, try_join};
16 #[tokio::test]
32 #[tokio::test]
50 #[tokio::test]
71 #[tokio::test]
132 drop(tokio::spawn(async move { join!(s1, s2, s3, s4) })); in spawn()
134 tokio::time::sleep(Duration::from_millis(30)).await; in spawn()
/tonic/examples/src/load_balance/
H A Dserver.rs6 use tokio::sync::mpsc;
27 #[tokio::main]
42 tokio::spawn(async move { in main()

12345