Fewer deps for Windows (doesn't need libc and memalloc anymore).
Somewhat safer allocation - relying on Vec + Drop which is guaranteed to run on any panic / return / etc instead of manually tracking a raw pointer for the buffer.
Increase initial buffer size as per official recommendations.
Add safe iteration helper for Windows linked lists (assuming that, if the first pointer is valid, then all others should be as well and will have the same lifetime). This significantly reduces number of individual unsafe usages and paves path for #45 as the entire function is now just an iterator + .collect().
Simplify socket address conversions by relying on Rust's built-in endianness helpers and the SOCKADDR_INET helper union.
Tested and confirmed. Thank you for the great improvements!
I've felt the need for safer implementations and refactoring in the Windows implementation, so your changes are very much appreciated.
unsafe
usages and paves path for #45 as the entire function is now just an iterator +.collect()
.