[Verse-dev] Gimp plug-in

Emil Brink emil at obsession.se
Wed Nov 3 11:11:38 CET 2004


On Wed, 03 Nov 2004 10:05:54 +0100
Thorsten Jordan <Thorsten_Jordan at gmx.de> wrote:

[...]
> > The one problem I've seen is that for large bitmaps it seems tiles can be
> > lost; if this is a plug-in or Verse problem has yet to be investigated.
>
> i suppose that is the same problem as with my pusher: the client sends 
> packets, but they're lost, if it doesn't recheck retrieval of them. The 
> plugin does not, the pusher also didn't and had the same problem. With 
> rechecking it works. So it's a verse problem.

Well... This is a point of great confusion it seems. You should _not_ need
to manually re-send data using Verse. The protocol does its own ACK/NAK
handling, and will resend lost packets automatically.

Of course, this requires that the Verse protocol is given CPU time, which
is why you can't just send N commands and then quit, that doesn't give
the protocol any time to handle the transmission.

I suggest using the release-r4-branch version of Verse, and then looping
on the verse_session_get_size() function, along the lines of this:

static void flush_verse(void)
{
	while(verse_session_get_size() > 10)
		verse_callback_update(100000)
}

This seems to work just fine for me, and since the "size" of a session is
the number of bytes in *non-delivered* (as managed by the protocol's ACK/
NAK handling), not just "non-written to socket" commands, it really should.

The "10" in the above example is due to a minor bug; the size currently
also includes the ACK/NACK commands themselves, which it shouldn't. A fix
of this has been promised by Eskil, in the meantime I think we can happily
assume that no actual command is that small... *Crosses fingers*.

> > I guess it could be a platform issue somehow, I run it under Linux only.
>
> That's right. I works fine under linux on my computer.
> But i used the gimp binaries from Brecht's link, so this should match 
> and work...

That is... Highly annoying, the Verse core really should be platform-
independant. One guess is that is has to do with differences in the
process switching abilities, perhaps Verse applications need to request
a higher priority or something.

Regards,

/Emil


More information about the Verse-dev mailing list