On Fri, Feb 10, 2017 at 08:17:47AM -0500, Frediano Ziglio wrote: > > > > On Tue, 2017-02-07 at 11:59 +0100, Christophe Fergeau wrote: > > > Similarly to the previous commits, this removes an indirection level, > > > IncomingHandlerInterface stores pointers to > > > alloc_recv_buf/release_recv_buf vfuncs, but these are always set to > > > RedChannel::alloc_recv_buf/RedChannel::release_recv_buf, which are > > > also > > > vfuncs which can be overridden if needed. This commit removes the > > > indirection and directly calls the relevant methods. > > > > > > Not sure whether the corresponding vfuncs belong in > > > RedChannel or if they should be moved to RedChannelClient. > > > > They do seem more appropriate to RedChannelClient, since the first > > argument is RedChannelClient*. If we do move them, it could be done in > > a subsequent commit, though. Maybe more of this stuff should be moved > > to the client? > > > > For me it's quite obvious. == > RedChannel with RedChannelClient handle a channel. > The separation allows to handle multiple clients or having a channel > with no clients attached (this last could be easily achieved without > RedChannelClient by the way). > RedChannelClient have the responsibility of dealing with a client > so for instance has a stream while RedChannel don't. > The RedChannelClient should deal with client state allowing the > channel to send different data if the client states are different > or filter messages based on client properties (for instance you > can think of an input channel connected to a client that is not > allowed to send input commands). == I would add something like this as some high-level documentation for RedChannelClient somewhere in the source. Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel