Re: [Qemu-devel] [PATCH 07/10] io: add qio_channel_read/write_all

2017-08-30 Thread Daniel P. Berrange
On Tue, Aug 22, 2017 at 03:18:29PM +0200, Paolo Bonzini wrote: > It is pretty common to read a fixed-size buffer from a socket. Add a > function that does this, either with multiple reads (on blocking sockets) > or by yielding if called from a coroutine. > > Cc: Daniel P. Berrange > Signed-off-b

Re: [Qemu-devel] [PATCH 07/10] io: add qio_channel_read/write_all

2017-08-23 Thread Paolo Bonzini
On 23/08/2017 07:08, Fam Zheng wrote: > On Tue, 08/22 15:18, Paolo Bonzini wrote: >> It is pretty common to read a fixed-size buffer from a socket. Add a >> function that does this, either with multiple reads (on blocking sockets) >> or by yielding if called from a coroutine. >> >> Cc: Daniel P. B

Re: [Qemu-devel] [PATCH 07/10] io: add qio_channel_read/write_all

2017-08-22 Thread Fam Zheng
On Tue, 08/22 15:18, Paolo Bonzini wrote: > It is pretty common to read a fixed-size buffer from a socket. Add a > function that does this, either with multiple reads (on blocking sockets) > or by yielding if called from a coroutine. > > Cc: Daniel P. Berrange > Signed-off-by: Paolo Bonzini > -

[Qemu-devel] [PATCH 07/10] io: add qio_channel_read/write_all

2017-08-22 Thread Paolo Bonzini
It is pretty common to read a fixed-size buffer from a socket. Add a function that does this, either with multiple reads (on blocking sockets) or by yielding if called from a coroutine. Cc: Daniel P. Berrange Signed-off-by: Paolo Bonzini --- include/io/channel.h | 36 ++