EntropySink

Technical & Scientific => Programming => Topic started by: ahluka on February 10, 2006, 11:57:59 AM

Title: winsock - peek?
Post by: ahluka on February 10, 2006, 11:57:59 AM
I'm working on a little FTP client and it's all going fine so far, but is there any function to "peek" at the incoming data without actually recv'ing it?
Title: winsock - peek?
Post by: Hillbillie on February 16, 2006, 07:33:18 AM
I wouldn't bet on it. In order to look at data, you need to have it in your hands, and to get it into your hands you've gotta receive it.

But who knows, I haven't worked with sockets in a while. Maybe there's something...

I'm curious; why would you want to "peek" at it without receiving it? Just receive it, dump it into a temporary buffer, and then "peek" at your buffer and discard.