• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Peeking at data on a socket (MSG_PEEK?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Peeking at data on a socket (MSG_PEEK?)


  • Subject: Peeking at data on a socket (MSG_PEEK?)
  • From: Heath Raftery <email@hidden>
  • Date: Sun, 10 Aug 2003 21:51:54 +1000

Hi networkers,

I am hoping to be able to peek at data on a socket I have connected in my application, so I look at the start of the data, and still let existing functions read the entire data later. Much like this guy actually: <http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF- 8&threadm=email@hidden&rnum=2&prev=/ groups?q=peek+socket&hl=en&lr=&ie=UTF-8&oe=UTF- 8&selm=3B55A87B.1030606%40uk.ibm.com&rnum=2>

To that end, I've found the MSG_PEEK option to the recv call, which looks perfect, is documented in man recv and appears in the header. I'm wondering if this option is supported on Mac OS X and if there are any pointers on its use. In particular, I imagine you can't loop around filling your peek data, like you normally do to get all the data out of the socket, so it is a one off shot and the data. Any other catches?

Cheers,
Heath
--
________________________________________________________
| Heath Raftery |
| email@hidden |
| *If I were two-faced, would I be wearing this one?* |
| _\|/_ |
|_______________________________________m(. .)m__________|
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Peeking at data on a socket (MSG_PEEK?)
      • From: Quinn <email@hidden>
  • Prev by Date: Locations disappear after creating dialup set with MoreSCF
  • Next by Date: dup() & sockets
  • Previous by thread: Re: Locations disappear after creating dialup set with MoreSCF
  • Next by thread: Re: Peeking at data on a socket (MSG_PEEK?)
  • Index(es):
    • Date
    • Thread