Commit e33ccb8
committed
Implement lightning-net
Squashed commits in original PR at
#1:
- Create empty lightning-net module
- SyncSocketDescriptor skeleton implementation
- Connection struct with read and write halves
- Implement shutdown() for TcpReader and TcpWriter
- Implement most of spawn_inbound_handler
- Add crossbeam and some associated channels
- Implement basic functionality of ConnectionWriter
- Pass a Arc<PeerManager> into ConnectionReader
- Get a SyncSocketDescriptor into the ConnectionWriter
- Implement first half of pausing reads
- Renome write tx/rx to write_data tx/rx
- Rename ConnectionReader/Writer to Reader/Writer
- Create the Reader/Writer cmd channels
- Send ResumeRead command to the Reader
- Remove write_cmd, rename reader_cmd -> resume_read
- Reader can handle ResumeRead events
- Implement disconnecting from peer
- send_data() actually sends data now
- Allow send_data() to pause reads
- Get a Arc<PeerManager> into Writer
- Refactor write_data tx/rx into writer_cmd tx/rx
- Give Reader/Writer a cmd tx for the other
- Implement all disconnecting except TcpDisconnectooor
- Remove the Arc<Mutex<Connection>>
- Refactor Connection into setup()
- disconnect_socket() now calls into TcpDisconnectooor
- Get a SyncSocketDescriptor into Writer
- Call write_buffer_space_avail and socket_disconnected v2
- resume_read check should go before the early return
- Handle read() ErrorKind variants
- Implement handle_connection and initiate_outbound
- Finish writing doc comments, clean up
- Basic tests for lightning-net
- These is modeled exactly after the tests in lightning-net-tokio
- Update GitHub CI and dependabot for lightning-net
- Reduce the dependencies used
- Implementing PR review feedback from @phlip9
- Remove some comments about SGX
- Hide ID_COUNTER in a function, return JoinHandles
- Reader/Writer now send commands via the descriptor
- Extract do_recv(), do_try_recv(), do_read() fns v2
- Split WriteData command into its own channel v4
- Remove `std::net` limitations from EDP doc comment
- Implement ReaderState enum v21 parent 6592081 commit e33ccb8
File tree
5 files changed
+1129
-1
lines changed- .github
- workflows
- lightning-net
- src
5 files changed
+1129
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| 146 | + | |
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
| 154 | + | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments