I'm having a client process launch a server process with xinetd. As I understand it, the server come to life being able to read from the client via its STDIN, and write to the client via its STDOUT. For various reasons (mainly having the server be able to use select() and then read() or recv() ) I want to be able to somehow transform STDIN and STDOUT into a socket and then perform ordinary socket I/O on it, as I will with the other servers that my server will connect to.
Can this be done? Is this even a meaningful question?