Home
last modified time | relevance | path

Searched refs:tx (Results 1 – 22 of 22) sorted by relevance

/tonic/examples/src/load_balance/
H A Dserver.rs31 let (tx, mut rx) = mpsc::unbounded_channel(); in main()
35 let tx = tx.clone(); in main() localVariable
47 tx.send(()).unwrap(); in main()
/tonic/examples/src/dynamic_load_balance/
H A Dserver.rs31 let (tx, mut rx) = mpsc::unbounded_channel(); in main()
35 let tx = tx.clone(); in main() localVariable
47 tx.send(()).unwrap(); in main()
/tonic/examples/src/streaming/
H A Dserver.rs61 let (tx, rx) = mpsc::channel(128); in server_streaming_echo()
64 match tx.send(Result::<_, Status>::Ok(item)).await { in server_streaming_echo()
99 let (tx, rx) = mpsc::channel(128); in bidirectional_streaming_echo()
108 Ok(v) => tx in bidirectional_streaming_echo()
122 match tx.send(Err(err)).await { in bidirectional_streaming_echo()
/tonic/tests/integration_tests/tests/
H A Dhttp2_keep_alive.rs21 let (tx, rx) = oneshot::channel::<()>(); in http2_keepalive_does_not_cause_panics()
44 tx.send(()).unwrap(); in http2_keepalive_does_not_cause_panics()
51 let (tx, rx) = oneshot::channel::<()>(); in http2_keepalive_does_not_cause_panics_on_client_side()
80 tx.send(()).unwrap(); in http2_keepalive_does_not_cause_panics_on_client_side()
H A Dconnection.rs39 let (tx, rx) = oneshot::channel(); in connect_returns_err_via_call_after_connected()
40 let sender = Arc::new(Mutex::new(Some(tx))); in connect_returns_err_via_call_after_connected()
74 let (tx, rx) = oneshot::channel(); in connect_lazy_reconnects_after_first_failure()
75 let sender = Arc::new(Mutex::new(Some(tx))); in connect_lazy_reconnects_after_first_failure()
H A Dconnect_info.rs29 let (tx, rx) = oneshot::channel::<()>(); in getting_connect_info()
55 tx.send(()).unwrap(); in getting_connect_info()
105 let (tx, rx) = oneshot::channel::<()>(); in getting_connect_info()
131 tx.send(()).unwrap(); in getting_connect_info()
H A Dextensions.rs40 let (tx, rx) = oneshot::channel::<()>(); in setting_extension_from_interceptor()
66 tx.send(()).unwrap(); in setting_extension_from_interceptor()
89 let (tx, rx) = oneshot::channel::<()>(); in setting_extension_from_tower()
115 tx.send(()).unwrap(); in setting_extension_from_tower()
H A Dstreams.rs29 let (tx, rx) = oneshot::channel::<()>(); in status_from_server_stream_with_source()
39 tx.send(()).unwrap(); in status_from_server_stream_with_source()
H A Duser_agent.rs25 let (tx, rx) = oneshot::channel::<()>(); in writes_user_agent_header()
56 tx.send(()).unwrap(); in writes_user_agent_header()
H A Dinterceptor.rs24 let (tx, rx) = oneshot::channel(); in interceptor_retrieves_grpc_method()
57 tx.send(()).unwrap(); in interceptor_retrieves_grpc_method()
H A Dhttp2_max_header_list_size.rs32 let (tx, rx) = oneshot::channel::<()>(); in test_http_max_header_list_size_and_long_errors()
67 tx.send(()).unwrap(); in test_http_max_header_list_size_and_long_errors()
H A Dclient_layer.rs26 let (tx, rx) = oneshot::channel(); in connect_supports_standard_tower_layers()
61 tx.send(()).unwrap(); in connect_supports_standard_tower_layers()
H A Dstatus.rs35 let (tx, rx) = oneshot::channel::<()>(); in status_with_details()
63 tx.send(()).unwrap(); in status_with_details()
93 let (tx, rx) = oneshot::channel::<()>(); in status_with_metadata()
133 tx.send(()).unwrap(); in status_with_metadata()
H A Dorigin.rs32 let (tx, rx) = oneshot::channel::<()>(); in writes_origin_header()
63 tx.send(()).unwrap(); in writes_origin_header()
H A Droutes_builder.rs56 let (tx, rx) = oneshot::channel::<()>(); in multiple_service_using_routes_builder()
108 tx.send(()).unwrap(); in multiple_service_using_routes_builder()
/tonic/tests/compression/src/
H A Dutil.rs93 let (tx, rx) = tokio::sync::mpsc::channel(32); in new()
94 (tx, Self { rx }) in new()
119 let (tx, new_body) = ChannelBody::new(); in measure_request_body_size_layer()
127 tx.send(chunk).await.unwrap(); in measure_request_body_size_layer()
/tonic/tonic/src/transport/channel/
H A Dmod.rs110 let (channel, tx) = Self::balance_channel(DEFAULT_BUFFER_SIZE); in balance_list()
112 tx.try_send(Change::Insert(endpoint.uri.clone(), endpoint)) in balance_list()
142 let (tx, rx) = channel(capacity); in balance_channel_with_executor()
144 (Self::balance(list, DEFAULT_BUFFER_SIZE, executor), tx) in balance_channel_with_executor()
/tonic/interop/src/
H A Dclient.rs154 let (tx, rx) = mpsc::unbounded_channel(); in ping_pong()
155 tx.send(make_ping_pong_request(0)).unwrap(); in ping_pong()
177 drop(tx); in ping_pong()
180 tx.send(make_ping_pong_request(responses.len())).unwrap(); in ping_pong()
/tonic/examples/src/routeguide/
H A Dserver.rs47 let (tx, rx) = mpsc::channel(4); in list_features()
54 tx.send(Ok(feature.clone())).await.unwrap(); in list_features()
/tonic/tonic-health/src/
H A Dserver.rs80 Some((tx, _)) => { in set_service_status()
85 tx.send(status).expect("channel should not be closed"); in set_service_status()
/tonic/
H A DCONTRIBUTING.md164 /// let (tx, rx) = mpsc::unbounded();
165 /// # tx.unbounded_send(()).unwrap();
166 /// # drop(tx);
199 /// let (tx, rx) = oneshot::channel();
200 /// # tx.send(()).unwrap();
/tonic/examples/
H A Drouteguide-tutorial.md404 let (tx, rx) = mpsc::channel(4);
410 tx.send(Ok(feature.clone())).await.unwrap();