I'm trying to create a crude telnet type program (eventually evolving into an irc client) for windows, in C.
Took me a while, but I got sockets down, but now I'm stuck on the user input aspect. Is there a way to "peek" at stdin? I'm sure there are methods out there to do this, and I have been searching the forum for about an hour now with no real luck, but I cannot seem to find them.
In a sense, I have an infinite while loop that waits for messages from the server I'm connecting to (works fine), but also, it needs to also handle user input for commands and such (does not work). Is there any type of streamPeak() type function out there? Or is there a different, more convoluted approach I'm going to have to take?
Thanks, and I'm sorry if this topic has already been posted. I'm not that frequent of a poster.