]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Allow non-blocking message sending on virNetClient
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 8 Nov 2011 09:13:27 +0000 (09:13 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 16 Nov 2011 10:49:55 +0000 (10:49 +0000)
commitff465ad203c5aa176f5d49994a375746c964ff99
treec9f98b379f79857329e46a481ab21388629bd393
parentb196220337089ee653a01da66a4ae3aac5a3c3d0
Allow non-blocking message sending on virNetClient

Add a new virNetClientSendNonBlock which returns 2 on
full send, 1 on partial send, 0 on no send, -1 on error

If a partial send occurs, then a subsequent call to any
of the virNetClientSend* APIs will finish any outstanding
I/O.

TODO: the virNetClientEvent event handler could be used
to speed up completion of partial sends if an event loop
is present.

* src/rpc/virnetsocket.h, src/rpc/virnetsocket.c: Add new
  virNetSocketHasPendingData() API to test for cached
  data pending send.
* src/rpc/virnetclient.c, src/rpc/virnetclient.h: Add new
  virNetClientSendNonBlock() API to send non-blocking API
src/rpc/virnetclient.c
src/rpc/virnetclient.h
src/rpc/virnetsocket.c
src/rpc/virnetsocket.h