quoth Rafi:

> The semantics of pn_messenger_put allow it to send if it can do so without
> blocking. 


So, am I understanding correctly? -- I should be able to get messages
from my sender to my receiver just by calling put() -- if the receiver 
is ready to receive?

The only transmission difference between put() and send() is that send() 
will actually block until they're all sent (or timeout hits).  put() should 
get rid of all the messages that aren't blocked, and leave all that are.

. . .

Because what I'm seeing is -- with my receiver hanging in recv(),
I put 5 messages.  Sender sits there for a while.  No messages arrive at
receiver.  Then sender calls send() -- and all 5 messages arrive at 
the receiver.

This is true whether on the receiver side, I use

   pn_messenger_recv ( messenger, 100 );
   pn_messenger_recv ( messenger, 5 );
   pn_messenger_recv ( messenger, 1 );
   or
   pn_messenger_recv ( messenger, -1 );
   

That's why it seemed two-stage to me.  put() seems to gets them staged, 
send() seems to shove them out the door.

No?
Or is this a bug?

Reply via email to