io: Add support for MSG_PEEK for socket channel

MSG_PEEK peeks at the channel, The data is treated as unread and
the next read shall still return this data. This support is
currently added only for socket class. Extra parameter 'flags'
is added to io_readv calls to pass extra read flags like MSG_PEEK.

Reviewed-by: Peter Xu <>
Reviewed-by: Daniel P. Berrange <>
Reviewed-by: Juan Quintela <>
Suggested-by: Daniel P. Berrange <>
Signed-off-by: manish.mishra <>
Signed-off-by: Juan Quintela <>
16 files changed