have a program that does an
I know how to get bytes available using
ioctl(), but I want to know what is the next available byte's value, without grabbing it. (A peek).
Is by using the
recv() call? If so, how? Somehow I have missed this point in my googling.
I was trying to use:
FILE* f = fdopen(_fd,"r+"); int byte = getc(f); ungetc(byte,f);
but I get a
resource is temporarily unavailable, presumably because of the pre-existing
Any suggestions? thank you.