Git repository hosting, collaboration, and discovery for the Fediverse.
Optional nativetls, defined versions and update deadpool.
parent: tbd commit: 6a2b9bb
1 | use SocketAddr; |
2 | |
3 | use ; |
4 | use SinkExt; |
5 | use Instance; |
6 | use ; |
7 | |
8 | use crate::; |
9 | |
10 | |
11 | pub target_instance: Instance, |
12 | pub socket_addr: , |
13 | |
14 | |
15 | |
16 | |
17 | type Type = Socket; |
18 | type Error = Error; |
19 | |
20 | async |
21 | info!; |
22 | let connection = connect_to .await?; |
23 | |
24 | // Handshake first! |
25 | let connection = new |
26 | .handshake |
27 | .await?; |
28 | Ok |
29 | |
30 | |
31 | async |
32 | match socket.send .await |
33 | Ok => Ok, |
34 | Err => |
35 | info!; |
36 | Err |
37 | |
38 | |
39 | |
40 | |
41 | |
42 | async |
43 | instance: &Instance, |
44 | socket_addr: & , |
45 | |
46 | if let Some = socket_addr |
47 | info! |
48 | "Connecting to {}", |
49 | format! |
50 | ; |
51 | let = |
52 | connect_async .await?; |
53 | info!; |
54 | |
55 | Ok |
56 | else |
57 | info! |
58 | "Connecting to {}", |
59 | format! |
60 | ; |
61 | let = |
62 | connect_async .await?; |
63 | info!; |
64 | |
65 | Ok |
66 | |
67 | |
68 |