Commit b71476b
signerproxy: Convert wire.rs to synchronous I/O (Phase 1)
Replace tokio async I/O with std synchronous I/O in wire.rs:
- Remove tokio::net::UnixStream, use std::os::unix::net::UnixStream
- Remove tokio::sync::Mutex, use std::sync::Mutex
- Convert async read/write methods to blocking
- Replace AsyncReadExt/AsyncWriteExt with std::io Read/Write
- Manually handle 4-byte length prefix with BigEndian read/write
This is Phase 1 of removing old tokio 0.2 dependency and converting
the gl-signerproxy subdaemon to use standard library threading instead
of async/await. The passfd FD passing implementation works naturally
with blocking sockets.1 parent 028835b commit b71476b
1 file changed
+27
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
73 | 80 | | |
74 | 81 | | |
75 | 82 | | |
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
| 87 | + | |
80 | 88 | | |
81 | 89 | | |
82 | 90 | | |
| |||
89 | 97 | | |
90 | 98 | | |
91 | 99 | | |
92 | | - | |
| 100 | + | |
93 | 101 | | |
94 | 102 | | |
95 | 103 | | |
96 | 104 | | |
97 | 105 | | |
98 | 106 | | |
99 | | - | |
100 | | - | |
101 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
102 | 116 | | |
| 117 | + | |
103 | 118 | | |
104 | 119 | | |
105 | 120 | | |
| |||
0 commit comments