To be able to get the size of the buffer to allocate for the next message without removing the message from the receive queue, the caller needs to be able to set the flags to MSG_PEEK | MSG_TRUNC.
This patch restores the ability of the caller to set the MSG_PEEK flag in a call to recv which was accidentally removed while adding support for the MSG_TRUNC flag in this commit.
To be able to get the size of the buffer to allocate for the next message without removing the message from the receive queue, the caller needs to be able to set the
flags
toMSG_PEEK | MSG_TRUNC
.This patch restores the ability of the caller to set the
MSG_PEEK
flag in a call to recv which was accidentally removed while adding support for theMSG_TRUNC
flag in this commit.