On Mon, 11 May 2020 12:51:46 +0100 Daniel P. Berrangé <berra...@redhat.com> wrote:
> 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. Having the code here simplifys the code in the other places. Regards, Lukas Straub > > Regards, > Daniel
pgpe0UA_BrJSl.pgp
Description: OpenPGP digital signature