rune
rune copied to clipboard
modules: Create net module
Add a net module, initially with SocketAddr and IpAddr types and their respective methods. TCP and UDP will be implemented in the future.
@udoprog how do I implement generating an IpAddr from a string, int, array of ints, etc., similar to the std IpAddr?
("127.0.0.1".parse())
(127, 0, 0, 1)
[127, 0, 0, 1]
how do I implement generating an IpAddr from a string, int, array of ints, etc., similar to the std IpAddr?
You add the relevant methods to perform the conversion. Like the parse associated method, possible through a trait.