socket: recv(MSG_PEEK) or select()



Not sure whether this is the right newsgroup... I need to detect if a
message is waiting at a socket, without consuming the message. Should I use
recv(MSG_PEEK) or should I use select (with timeout = 0)?


.



Relevant Pages

  • Re: socket: recv(MSG_PEEK) or select()
    ... message is waiting at a socket, without consuming the message. ... Barry Margolin, barmar@xxxxxxxxxxxx ...
    (comp.unix.questions)
  • Re: "save as" and "open" do not respond in MS Word
    ... This message is posted to a newsgroup. ... but enter can be the string or just the enter key. ... Explorer or the Windows shell after you install security update ... even after waiting for 6 to 7 mins. ...
    (microsoft.public.word.docmanagement)
  • Re: Nonblocking and/or win32
    ... Check to see if there's any data waiting. ... your program cannot have data from the socket. ... If the program use a event driven framework, ... No virus found in this outgoing message. ...
    (comp.lang.ruby)
  • Re: tasksing and TCP sockets
    ... Does that mean e.g. to set the main task to 10 and the second task to ... > on socket completions, not polling for them. ... I find the commercially supported GNAT to be ... Redesign to be waiting on ...
    (comp.lang.ada)
  • Re: Port binding revisited
    ... socket, binding it to a port, ... Then, I go over to my client - Telnet, Gnome ... waiting for a data event. ... but returns the size of the buffer ...
    (comp.lang.asm.x86)