[libvirt] [PATCH 03/16] Add callback to virNetClient to be invoked on EOF

Daniel P. Berrange berrange at redhat.com
Thu Jul 19 09:02:26 UTC 2012

On Thu, Jul 19, 2012 at 10:59:40AM +0200, Jiri Denemark wrote:
> On Wed, Jul 18, 2012 at 17:32:24 +0100, Daniel P. Berrange wrote:
> > From: "Daniel P. Berrange" <berrange at redhat.com>
> > 
> > Allow detection of EOF in virNetClient via an callback
> > function, triggered from the socket event handler
> EOF callback is nice but since we have keepalive, sockets can also be closed
> by clients without actually triggering EOF. Should we rather implement a
> virNetClientCloseCallback with a parameter that would indicate whether the
> socket was closed externally (EOF) or internally (keepalive)? Such callback
> could even be visible to apps as a public API so that they are notified about
> closed connection even when they have no pending call.

Hmm, yes, I had considered whether we could make this available to the
public API to avoid virt-manager needing the hacks it currently does.

|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

More information about the libvir-list mailing list