Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.protocols.tcp-ip    |    TCP and IP network protocols.    |    14,669 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 13,240 of 14,669    |
|    Jorgen Grahn to zhangyefei.yefei@gmail.com    |
|    Re: how to use MSG_PEEK flag    |
|    02 Dec 09 14:50:49    |
      7474b454       From: grahn+nntp@snipabacken.se              On Wed, 2009-12-02, zhangyefei.yefei@gmail.com wrote:       ...       > maybe i do not express my true intention .sorry that.       > Actually,what i want to know is,whether after peeking having N bytes       > available ( that is ,after n=recv(fd,buf,len,MSG_PEEK) , n will be       > equal to len ), will the following recv ( called once and just once)       > return N bytes (that is ,after n=read(fd,buf,len), n will be equal to       > len )?       > will this scenario always be true?              *That* is a much clearer question. Thanks!              I'm not sure, but one of the experts will probably answer.              I personally do not want to know, because I think using       MSG_PEEK is a sign of a bad design. There is usually a       better way of solving the problem (whatever the problem is).              /Jorgen              --        // Jorgen Grahn |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca