-
Notifications
You must be signed in to change notification settings - Fork 422
Closed
Description
Hi there,
I have a proposal.
IPv4 socket addresses consist of an IPv4 address and a 16-bit port number, as stated in IETF RFC 793
It may be good to use SocketV4 and SocketV6 here, and also the same naming in Rust std SocketAddr
rust-lightning/lightning/src/ln/msgs.rs
Lines 745 to 759 in 74a9ed9
| pub enum NetAddress { | |
| /// An IPv4 address/port on which the peer is listening. | |
| IPv4 { | |
| /// The 4-byte IPv4 address | |
| addr: [u8; 4], | |
| /// The port on which the node is listening | |
| port: u16, | |
| }, | |
| /// An IPv6 address/port on which the peer is listening. | |
| IPv6 { | |
| /// The 16-byte IPv6 address | |
| addr: [u8; 16], | |
| /// The port on which the node is listening | |
| port: u16, | |
| }, |
If this proposal is good, I am happy to do this and also #2183, #2056 at the same time. Some these are implemented in our project.
https://github.com/kuutamolabs/lightning-knd/blob/e5f05755be1c702c56b469964c7d9586bce15e5d/api/src/lib.rs
Metadata
Metadata
Assignees
Labels
No labels