Author Topic: winsock - peek?  (Read 3263 times)

ahluka

  • Jackass IV
  • Posts: 794
  • Karma: +10/-201
winsock - peek?
« 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?

Hillbillie

  • Jackass II
  • Posts: 69
  • Karma: +11/-0
winsock - peek?
« Reply #1 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.
Reduced fat and now 100% pot free, but same great okay taste.