rune icon indicating copy to clipboard operation
rune copied to clipboard

modules: Create net module

Open ramon-bernardo opened this issue 1 year ago • 2 comments

Add a net module, initially with SocketAddr and IpAddr types and their respective methods. TCP and UDP will be implemented in the future.

ramon-bernardo avatar Sep 02 '24 23:09 ramon-bernardo

@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]

ramon-bernardo avatar Sep 16 '24 22:09 ramon-bernardo

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.

udoprog avatar Sep 17 '24 19:09 udoprog