I am new to winsock, I tried to write a server socket that accepts new connection, then it calls an external executable file. How can we redirect the stdin and stdout of the
It's not correct to say that socket handles cannot be used for redirected IO to child processes. We do it all the time for CGI in our web server code. We don't use named or unnamed pipes, or intermediary processes.
a_mole is correct. You just need non-overlapped sockets.
You can either use WSASocket, or if you created the socket already with socket (or can't use WSASocket on your target OS, e.g. Pre Windows 7 SP1) you can use setsockopt to set the current thread's SO_OPENTYPE to SO_SYNCHRONOUS_NONALERT