Re: [Qemu-devel] [PULL v4 4/9] io: add QIOChannelSocket class

2016-01-08 Thread Paolo Bonzini
On 18/12/2015 13:21, Daniel P. Berrange wrote: > + > +if (nfds > SOCKET_MAX_FDS) { > +error_setg_errno(errp, -EINVAL, > + "Only %d FDs can be sent, got %zu", > + SOCKET_MAX_FDS, nfds); > +return -1; > +

Re: [Qemu-devel] [PULL v4 4/9] io: add QIOChannelSocket class

2016-01-08 Thread Daniel P. Berrange
On Fri, Jan 08, 2016 at 10:04:23AM +0100, Paolo Bonzini wrote: > > > On 18/12/2015 13:21, Daniel P. Berrange wrote: > > + > > +if (nfds > SOCKET_MAX_FDS) { > > +error_setg_errno(errp, -EINVAL, > > + "Only %d FDs can be sent, got %zu", > > +

[Qemu-devel] [PULL v4 4/9] io: add QIOChannelSocket class

2015-12-18 Thread Daniel P. Berrange
Implement a QIOChannel subclass that supports sockets I/O. The implementation is able to manage a single socket file descriptor, whether a TCP/UNIX listener, TCP/UNIX connection, or a UDP datagram. It provides APIs which can listen and connect either asynchronously or synchronously. Since there is