Modern alternatives to net2?

net2 by alex crichton allows us to customize TCP sockets or UDP sockets as such:


However, it does not compile and uses rust from the bronze ages. Is there a postmodern alternative to net2?


@alexcrichton, I just managed to get it to compile in linux. I am now working on the windows version. I had to update the version to 2018, and am updating the code. My oh my, you've come a long ways since the days of net2!


I fixed compile errors on both windows and linux, but the others are unchecked


under , it's asking for an i32 input to form the protocol. IS there a table that shows what value maps to which protocol?

Those would be in the libc headers, but there are constructors for the common protocols.

ths IANA list for internet protocols is here , though, it's rare to pass a non-zero protocol to the socket contructor, as for most socket domain/type combos there's only one common choice (SOCK_RAW is a notable exeption).