Hi

On Wed, Mar 3, 2021 at 4:13 PM Gerd Hoffmann <kraxel@redhat.com> wrote:
  Hi,

> > +        case Z_BUF_ERROR:
> > +            out_len <<= 1;
> > +            if (out_len > (1 << 20)) {
> >
>
> 1Mb isn't that much, is it? Well, since it handles only text for now it's
> probably enough. Would it make sense to make this a #define for clarity ?

Yep.  While talking about sizes:  How does vdagent handles large
clipboard chunks?  There is ...

#define VD_AGENT_MAX_DATA_SIZE 2048

... but I suspect clipboard content isn't limited to that ...


The client splits large data to send in many messages.  I don't see the agent doing the same (I might be missing something). I guess the rationale behind is to be able to transmit other (agent or not) messages interleaved on the main channel, and this is more important from the client side. The amount of client outgoing agent messages is rate-controlled by a token counter.

--
Marc-André Lureau