Re: Bidirectional transfer on the same channel

[email protected] (Jonas Borgström) 07 Nov 2002 19:24:10 +0100
Newsgroups gmane.network.beep.roadrunner.general
Message-ID <[email protected]>
Andrea Campi <[email protected]> writes:

> Hi all,
> 
> I need a little clarification. Simplifying, I want my client and my
> server to both send a MSG as soon as possible after the channel is
> up (think handshake). Something like:
> 
> I: MSG 3 0 . xxx xxx
> I: ...
> 
> L: MSG 3 0 . xxx xxx
> L: ...
> 
> L: RPY 3 0 . xxx xxx
> L: ...
> 
> I: RPY 3 0 . xxx xxx
> I: ...
> 
> 
> However, this doesn't seem to work, as out_queue_push_message (called
> by rr_channel_send_message) will find the slot reserved for the RPY
> to the first message.
> 
> In fact, if I manually assign msg->msgno so that:
> 
> I: MSG 3 0 . xxx xxx
> I: ...
> 
> L: MSG 3 1 . xxx xxx
> L: ...
> 
> L: RPY 3 1 . xxx xxx
> L: ...
> 
> I: RPY 3 0 . xxx xxx
> I: ...
> 
> Everything works fine.
> 
I didn't quite understand this? Does the listener answer its own MSG?

> 
> Now: is this a bug, is this by design or am I doing something wrong?
> I would say a bug, since RFC3080, section 2.7 explicitely says
> "message numbers are unidirectionally significant" and several
> examples. It would probably be a good idea not to queue outgoing MSG,
> or provide separate a queue.
> 

There is a bug in the out queue in the cvs version. This is because it has
to be handled differently depending on if it is a MSG or a RPY.

Can you try this patch and see if it works?

http://afs.codefactory.se/~jonas/roadrunner-reorder.diff

please note that this patch breaks binary compatibility with RRMessage
derived classes.

Thanks for the bug report!

/ Jonas
-- 
Jonas Borgström                  [email protected]
CodeFactory AB                   http://www.codefactory.se/
Office: +46 (0)90 71 86 14