Home
last modified time | relevance | path

Searched refs:client (Results 1 - 25 of 38) sorted by relevance

12

/commonlibrary/rust/ylong_http/ylong_http_client/tests/common/
H A Dasync_utils.rs223 let client = ylong_http_client::async_impl::Client::builder()
228 let client = std::sync::Arc::new(client);
231 let client = std::sync::Arc::clone(&client);
235 ClientRef: client,
280 //let client = async_build_http_client();
281 let client = ylong_http_client::async_impl::Client::new();
282 let client = std::sync::Arc::new(client);
[all...]
H A Dsync_utils.rs221 let client = ylong_http_client::sync_impl::Client::builder()
226 let client = std::sync::Arc::new(client);
229 let client = std::sync::Arc::clone(&client);
232 ClientRef: client,
279 let client = ylong_http_client::sync_impl::Client::new();
280 let client = Arc::new(client);
283 let client
[all...]
/commonlibrary/rust/ylong_http/ylong_http_client/tests/
H A Dsdv_async_https_pinning.rs35 /// 3. The client sends a request message.
38 /// 6. Verifies the received response on the client.
82 let client = ylong_http_client::async_impl::Client::builder() in sdv_client_public_key_pinning()
92 ClientRef: client, in sdv_client_public_key_pinning()
131 let client = ylong_http_client::async_impl::Client::builder() in sdv_client_public_key_pinning()
141 ClientRef: client, in sdv_client_public_key_pinning()
180 let client = ylong_http_client::async_impl::Client::builder() in sdv_client_public_key_pinning()
190 ClientRef: client, in sdv_client_public_key_pinning()
216 /// 3. The client sends a request message.
219 /// 6. Verifies the received response on the client
[all...]
H A Dsdv_async_http_client_error.rs60 /// 2. The client sends a request message that uri is reserved.
63 let client = Client::builder() in sdv_err_start_connect_timeout()
77 let resp = client.request(request).await; in sdv_err_start_connect_timeout()
88 /// 3. The client sends a request message.
122 let client = Client::builder() in sdv_err_req_timeout()
137 let resp = client.request(request).await; in sdv_err_req_timeout()
167 /// 3. The client sends a request message.
199 let client = Client::builder() in sdv_err_redirect_wrong_location()
214 let resp = client.request(request).await; in sdv_err_redirect_wrong_location()
232 /// 3. The client send
[all...]
H A Dsdv_async_client_build.rs34 let client = Client::builder() in sdv_client_tls_builder()
46 assert!(client.is_err()); in sdv_client_tls_builder()
H A Dsdv_async_http2.rs33 // This channel allows the server to notify the client when it is up and running.
36 // This channel allows the client to notify the server when it is ready to shut down.
39 // This channel allows the server to notify the client when it has shut down.
169 let client = Client::builder() in sdv_async_h2_client_send_request()
183 let mut response = client.request(request).await.expect("get response failed"); in sdv_async_h2_client_send_request()
209 .expect("send client shutdown"); in sdv_async_h2_client_send_request()
226 let client = Client::builder() in sdv_async_h2_client_send_request_concurrently()
247 let client_interface = Arc::new(client); in sdv_async_h2_client_send_request_concurrently()
251 let client = client_interface.clone(); in sdv_async_h2_client_send_request_concurrently()
262 let mut response = client in sdv_async_h2_client_send_request_concurrently()
[all...]
/commonlibrary/rust/ylong_http/ylong_http_client/tests/tcp_server/
H A Dasync_utils.rs127 let client = ylong_http_client::async_impl::Client::new();
128 let client = std::sync::Arc::new(client);
131 let client = std::sync::Arc::clone(&client);
135 ClientRef: client,
165 ClientRef: $client:expr,
199 let mut response = $client
H A Dsync_utils.rs91 shutdown_handle.join().expect("join to wait client thread finish failed !");
121 let client = ylong_http_client::sync_impl::Client::new();
122 let client = std::sync::Arc::new(client);
125 let client = std::sync::Arc::clone(&client);
129 ClientRef: client,
158 ClientRef: $client:expr,
189 let mut response = $client
/commonlibrary/rust/ylong_http/ylong_http_client/examples/
H A Dasync_certs_adapter.rs14 //! This is a simple asynchronous HTTPS client example.
45 let client = Arc::new( in main()
53 let temp = client.clone(); in main()
62 async fn request(client: Arc<Client>) -> Result<(), HttpClientError> {
68 let response = client.request(request).await?;
H A Dsync_proxy_http.rs14 //! This is a simple synchronous HTTP client example using the ylong_http_client
15 //! crate. It demonstrates creating a client, making a request, and reading the
22 let client = ClientBuilder::new() in main()
32 let mut response = client.request(request)?; in main()
H A Dsync_redirect_http.rs14 //! This is a simple synchronous HTTP client redirect example using the
15 //! ylong_http_client crate. It demonstrates creating a client, making a
23 let client = ClientBuilder::new().redirect(Redirect::default()).build()?; in main()
31 let mut response = client.request(request)?; in main()
H A Dsync_http.rs14 //! This is a simple synchronous HTTP client example using the ylong_http_client
15 //! crate. It demonstrates creating a client, making a request, and reading the
23 let client = Client::new(); in main()
31 let mut response = client.request(request)?; in main()
H A Dasync_http_multi.rs14 //! This is a simple asynchronous HTTP client example using the
15 //! ylong_http_client crate. It demonstrates creating a client, making a
25 let client = Client::new(); in main()
31 let response = client.request(request).await.unwrap(); in main()
H A Dasync_http.rs14 //! This is a simple asynchronous HTTP client example using the
15 //! ylong_http_client crate. It demonstrates creating a client, making a
32 let client = Client::new();
40 let response = client.request(request).await?;
/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/
H A Duds_test.rs27 /// 1. Creates a server and a client with `pair()`.
34 let (server, client) = UnixStream::pair().unwrap(); in sdv_uds_stream_try_test()
47 client.readable().await.unwrap(); in sdv_uds_stream_try_test()
49 match client.try_read(&mut data) { in sdv_uds_stream_try_test()
69 /// 1. Creates a server and a client with `pair()`.
76 let (server, client) = UnixDatagram::pair().unwrap(); in sdv_uds_datagram_try_test()
89 client.readable().await.unwrap(); in sdv_uds_datagram_try_test()
91 match client.try_recv(&mut data) { in sdv_uds_datagram_try_test()
H A Dasync_buf_read.rs23 /// 2. The client sends some data to the server. The message contains a `:`
48 let client = ylong_runtime::spawn(async move { in sdv_buf_reader_read_until()
60 ylong_runtime::block_on(client).unwrap(); in sdv_buf_reader_read_until()
67 /// 2. The client sends some data to the server. The message contains the `\n`
90 let client = ylong_runtime::spawn(async move { in sdv_buf_reader_read_line()
102 ylong_runtime::block_on(client).unwrap(); in sdv_buf_reader_read_line()
109 /// 2. The client sends some data to the server. The message contains a `-`
129 let client = ylong_runtime::spawn(async move { in sdv_buf_reader_split()
141 ylong_runtime::block_on(client).unwrap(); in sdv_buf_reader_split()
148 /// 2. The client send
[all...]
H A Dtcp_test.rs195 // Start a thread as client side in sdv_tcp_global_runtime()
197 let mut client = TcpStream::connect(addr).await; in sdv_tcp_global_runtime() variables
198 while client.is_err() { in sdv_tcp_global_runtime()
199 client = TcpStream::connect(addr).await; in sdv_tcp_global_runtime()
201 let mut client = client.unwrap(); in sdv_tcp_global_runtime() variables
203 let n = client in sdv_tcp_global_runtime()
206 .expect("client send failed"); in sdv_tcp_global_runtime()
210 let n = client in sdv_tcp_global_runtime()
213 .expect("client rec in sdv_tcp_global_runtime()
[all...]
H A Dasync_buf_write.rs24 /// 2. The client wraps the TcpStream inside a AsyncBufWriter and calls `write`
41 let client = ylong_runtime::spawn(async move { in sdv_buf_writer_write()
56 ylong_runtime::block_on(client).unwrap(); in sdv_buf_writer_write()
63 /// 2. The client wraps the TcpStream inside a AsyncBufWriter and calls
80 let client = ylong_runtime::spawn(async move { in sdv_buf_writer_write_vectored()
98 ylong_runtime::block_on(client).unwrap(); in sdv_buf_writer_write_vectored()
159 /// 2. The client wraps the TcpStream inside a AsyncBufWriter and calls
176 let client = ylong_runtime::spawn(async move { in sdv_buf_writer_write_vectored_2()
194 ylong_runtime::block_on(client).unwrap(); in sdv_buf_writer_write_vectored_2()
/commonlibrary/rust/ylong_http/ylong_http_client/src/sync_impl/
H A Dclient.rs27 /// HTTP synchronous client implementation. Users can use `Client` to
37 /// let client = Client::new();
43 /// let response = client.request(request).unwrap();
64 /// let client = Client::new();
103 /// let client = Client::new();
104 /// let response = client.request(Request::new(EmptyBody));
181 /// let client = ClientBuilder::new().build();
188 client: ClientConfig,
211 client: ClientConfig::default(), in new()
247 self.client in request_timeout()
[all...]
H A Dmod.rs14 //! HTTP synchronous client module.
16 //! This module provides synchronous client components.
18 //! - [`Client`]: The main part of client, which provides the request sending
28 mod client; modules
35 pub use client::{Client, ClientBuilder};
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/
H A Dmod.rs14 //! HTTP asynchronous client module.
16 //! This module provides asynchronous client components.
18 //! - [`Client`]: The main part of client, which provides the request sending
26 mod client; modules
49 pub use client::ClientBuilder;
63 pub type Client = client::Client<HttpConnector>;
/commonlibrary/rust/ylong_runtime/ylong_io/tests/
H A Dtcp_test.rs24 /// 2. Write `hello` to client
25 /// 3. Read `hello` from client
72 let mut client = loop { in sdv_tcp_server() variables
80 let ret = client.read(&mut buf).unwrap(); in sdv_tcp_server()
84 let ret = client.write(&buf).unwrap(); in sdv_tcp_server()
94 /// 2. Write `hello` to client
95 /// 3. Read `hello` from client
146 let mut client = loop { in sdv_tcp_server_vectored() variables
154 let ret = client.read(&mut buf).unwrap(); in sdv_tcp_server_vectored()
158 let ret = client in sdv_tcp_server_vectored()
[all...]
/commonlibrary/rust/ylong_runtime/ylong_runtime/benches/bin/
H A Dylong_tokio_tcp_perf.rs17 //! - Create a client and a server and connect them to each other.
18 //! - The client sends a message and the server receives the message.
19 //! - The server sends a message and the client receives the message.
39 if let Ok(mut client) = TcpStream::connect(addr).await { in ylong_create_client()
40 match client.write(b"hello server").await { in ylong_create_client()
45 panic!("client send failed {}", e); in ylong_create_client()
48 match client.read(&mut recv_buf).await { in ylong_create_client()
52 "hello client".to_string() in ylong_create_client()
54 assert_eq!(n as usize, "hello client".len()); in ylong_create_client()
58 panic!("client rec in ylong_create_client()
[all...]
/commonlibrary/rust/ylong_runtime/ylong_runtime/benches/
H A Dylong_tokio_tcp.rs24 ($runtime: expr, $bench: ident, $server: ident, $client: ident, $port: literal, $task_num: literal, $loop_num: literal, $buf_size: literal) => {
38 pub async fn $client(addr: String) {
64 handlers.push(runtime.spawn($client(addr.clone())));
76 ($bench: ident, $server: ident, $client: ident, $port: literal, $task_num: literal, $loop_num: literal, $buf_size: literal) => {
90 pub async fn $client(addr: SocketAddr) {
118 handlers.push(ylong_runtime::spawn($client(addr)));
H A Dylong_tokio_uds.rs25 ($runtime: expr, $bench: ident, $server: ident, $client: ident, $path: literal, $task_num: literal, $loop_num: literal, $buf_size: literal) => {
39 pub async fn $client(addr: String) {
63 handlers.push(runtime.spawn($client(addr.clone())));
79 ($bench: ident, $server: ident, $client: ident, $path: literal, $task_num: literal, $loop_num: literal, $buf_size: literal) => {
93 pub async fn $client(addr: String) {
117 handlers.push(ylong_runtime::spawn($client(addr.clone())));

Completed in 8 milliseconds

12