After spending a few days reading a bazillion docs about servers, can someone set me straight about what I think I read?

I thought I read that stdin and stdout can be set to read/write traffic on the internet through a network adapter and/or modem. The only part I don't understand is how you would set the standard in/out to do that.
Or did I just get myself running around in circles?

Yes, I know about winsock and stuff but would like to know how to do it this way.

Posted on 2002-12-24 21:44:57 by drhowarddrfine
One way to do it: pipe.

But that assumes that you run a program talking to winsock which CreateProcess() another program working only with STD_INPUT_HANDLE and STD_OUTPUT_HANDLE.

If you want to talk directly to the ports... SetStdHandle() will be useful for your task.
Posted on 2002-12-25 19:04:49 by Starless
Yes, but I'm talking about not using winsock at all. How do you set stdin so you can read from the network adapter? Or is that just not possible?
Posted on 2002-12-25 21:11:53 by drhowarddrfine
Try looking into named pipes. If your asking how to 'read' all incoming network traffic and dump it to stdout then I am afraid it won't help. If you are just looking for a way to redirect stdin and stdout over the network without monkeying with winsock than you may find it useful. Although almost no-one uses named pipes anymore for any kind of serious networking tools (except microsoft, and they have at terrible security record), they are still easier to learn and use than sockets. I did a quick google, and you can find a tutorial here (in c++)...
If this isn't what your looking for than maybe you just want a packet sniffer? There is a good free one for windows here...
Unfortunatly named pipes do not work in 'workstation OS's (microsoft)' anyhow you can use anonymous pipes on win95/98/ME but they will not transmit over the network.They will however still allow you to redirect stdin/out example in c++/ASM here...
Hope some of this was in someway useful...
Posted on 2002-12-26 08:29:15 by emonk
Thanks emonk. Good links. At least they tell me what I need to know.
Posted on 2002-12-27 18:59:28 by drhowarddrfine