Add repository settings
parent: tbd commit: f8eaf38
1 | use ; |
2 | use DaemonConnectionPool; |
3 | use |
4 | , AuthenticatedPayload, | ConnectionError
5 | ; |
6 | |
7 | use Message; |
8 | |
9 | pub async |
10 | let connection = pool.get .await; |
11 | |
12 | let mut connection = match connection |
13 | Ok => connection, |
14 | Err => |
15 | return Binary |
16 | |
17 | ; |
18 | |
19 | let send_result = connection |
20 | .send |
21 | .await; |
22 | |
23 | if let Err = send_result |
24 | return Binary; |
25 | |
26 | |
27 | loop |
28 | let message = connection.next .await; |
29 | |
30 | match message |
31 | Some => |
32 | match message |
33 | => return Binary, | Binary
34 | => | Ping
35 | let _ = connection.send .await; |
36 | continue; |
37 | |
38 | => | Close
39 | return Binary |
40 | String from |
41 | .into_bytes, |
42 | |
43 | |
44 | _ => continue, |
45 | ; |
46 | |
47 | Some => |
48 | return Binary |
49 | unwrap, | to_vec .
50 | |
51 | |
52 | _ => |
53 | info!; |
54 | continue; |
55 | |
56 | |
57 | |
58 | |
59 | todo! |
60 | |
61 |