On Mon, May 11, 2020 at 01:14:41PM +0200, Lukas Straub wrote: > Add qio_channel_set_yank function to channel and to channel-socket, > which will register a yank function. The yank function calls > shutdown() on the socket. > > Signed-off-by: Lukas Straub <lukasstra...@web.de> > --- > Makefile.objs | 1 + > include/io/channel-socket.h | 1 + > include/io/channel.h | 12 ++++++++++++ > io/channel-socket.c | 29 +++++++++++++++++++++++++++++ > io/channel.c | 9 +++++++++ > 5 files changed, 52 insertions(+)
Assuming we want the yank feature (which I'm not entirely convinced of), then I don't think any of this addition should exist. The QIOChannel class already provides a "qio_channel_shutdown" method which can be invoked. The layer above which is using the QIOChannel should be calling this existing qio_channel_shutdown method in response to any yank request. The I/O layer shouldn't have any direct dependancy on the yank feature. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|