[zeromq-dev] UDP message with zeromq 2.0beta

Guo, Yanchao Yanchao.Guo at sac.com
Thu Jan 21 10:59:01 CET 2010


thanks Martin. I put it into a endless loop and I can see that there is no packet drop for my local testing. 

Is there a way to flush the sending thread before program exist? 

Yanchao


-----Original Message-----
From: Martin Sustrik [mailto:sustrik at 250bpm.com]
Sent: Thu 1/21/2010 4:31 AM
To: Guo, Yanchao
Cc: zeromq-dev at lists.zeromq.org
Subject: Re: [zeromq-dev] UDP message with zeromq 2.0beta
 
Guo,

Ok, i see. The problem is that you close the sender application 
immediately after send, even before it has chance to push the message to 
the network.

Try to sleep a while before closing the sender.

Martin

Guo, Yanchao wrote:
> I believe the client code is blocking. So what I did is that I start 
> client first, which keeps running until it gets a message; then I start 
> server.
> 
> I know the packet is lost, as the server exits as it completed the 
> sending, but client is still running as it doesn't receive message.
> 
> Yanchao
> 
> 
> -----Original Message-----
> From: Martin Sustrik [mailto:sustrik at 250bpm.com]
> Sent: Thu 1/21/2010 3:08 AM
> To: Guo, Yanchao
> Cc: zeromq-dev at lists.zeromq.org
> Subject: Re: [zeromq-dev] UDP message with zeromq 2.0beta
> 
> Guo,
> 
>  > Hi Martin, I am trying the simple test program for udp, and I setup a
>  > simple pair of server/client on my machine. Out of 10 messages, I only
>  > get like 4 or 5 messages successfully received. I understand that UDP
>  > doesn't guarantee that all message to be delivered , but I think the
>  > success rate is just too low. Did you see the same for your testing?
> 
> There's no real storage for the messages on the network switch or
> elsewhere, so you won't get historical messages. For example: Send a
> message, close the sender application. Open the receiver application,
> ask for message => you'll get nothing. You have to have both
> applications running to guarantee lossless semantics.
> 
> Martin
> 
> DISCLAIMER: This e-mail message and any attachments are intended solely 
> for the use of the individual or entity to which it is addressed and may 
> contain information that is confidential or legally privileged. If you 
> are not the intended recipient, you are hereby notified that any 
> dissemination, distribution, copying or other use of this message or its 
> attachments is strictly prohibited. If you have received this message in 
> error, please notify the sender immediately and permanently delete this 
> message and any attachments.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100121/50c36fce/attachment.htm>


More information about the zeromq-dev mailing list