Rust, let me share your awesomeness with C
whynot.fail
whynot.fail
A TcpStream is just a struct containing the file descriptor (https://github.com/rust-lang/rust/blob/master/src/libstd/sys...) and nothing else, so this would be fine:
let stream: std::net::TcpStream = unsafe { std::mem::transmute(socket) };It works fairly good - although I have other problems...