Did you check the return value of uv_udp_bind?
*I do check the return value and it was successful. H*ave by-passed the 
issue in our current project by replying to a pre-defined port (not using 
the inspected port) and the fact that the server receives the response data 
indicates that the binding worked.

You can use uv_udp_getsockname to get back the bound address; is it 
what you expected?
*No! It returns 32512 (the port I see on the far end)*. The really weird 
thing is that this port is returned for every UDP binding, all binding to 
different ports.
So all UDP data in the application is going out 32512.


On Monday, 26 May 2014 17:10:17 UTC+10, Saúl Ibarra Corretgé wrote:
>
> -----BEGIN PGP SIGNED MESSAGE----- 
> Hash: SHA1 
>
> On 05/26/2014 04:57 AM, Stephen von Takach wrote: 
> > Not sure if this is an issue or not so wanted to post here to ask 
> > about desired behaviour. 
> > 
> > What I was expecting: (This is what happens on my Mac which I use 
> > for development) 
> > 
> > * On an origin server I create UDP binding to a particular port 
> > (lets say 3200 for example) * I send some data over UDP (using the 
> > libuv handle created above) to a remote IP * The remote server 
> > inspects the IP and port the data was sent on * The remote server 
> > can then reply using the IP and Port above * The origin server will 
> > receive the reply via the bound UDP port 
> > 
> > 
> > What I'm experiencing: (This is what happens on the Linux and 
> > Windows servers we deploy on) 
> > 
> > * On an origin server I create UDP binding to a particular port 
> > (lets say 3200 for example) * I send some data over UDP (using the 
> > libuv handle created above) to a remote IP * The remote server 
> > inspects the IP and port the data was sent on * The data was sent 
> > using an ephemeral port hence any reply is not received.. 
> > 
> > 
> > I would have thought the behaviour I am experiencing on my Mac is 
> > the desired behaviour. Does anyone know if there is any reason for 
> > a difference in behaviour? 
> > 
> > I do send data immediately after binding - do I need to delay? 
> > Doesn't appear that I should have to as there is no callback 
> > option. Any thoughts would be greatly appreciated. 
> > 
>
> Did you check the return value of uv_udp_bind? Was it successful? You 
> can use uv_udp_getsockname to get back the bound address; is it what 
> you expected? 
>
> Can you post your test code? 
>
> - -- 
> Saúl Ibarra Corretgé 
> bettercallsaghul.com 
>
> -----BEGIN PGP SIGNATURE----- 
> Version: GnuPG v1 
> Comment: Using GnuPG with Icedove - http://www.enigmail.net/ 
>
> iQIcBAEBAgAGBQJTguiZAAoJEEEOVVOum8BZfXMP/jFZosfpF3e38Pt2HsfbW7c2 
> H/+Sbu7y5JHnRdyehcHdFlQchA41xDnCupDZYcrhL+f4bMA2kX4XS7LvznXbRiQJ 
> dUJr3WYfguNbuSLhShqmRovq1cl9EhHAY6pn7ahjj1T8Skjy9ZFkWcOk5xsm5xmN 
> XfrVbW3tm2S9LBbxQOUUPJHCmwfZK/f6dXToRgqarSM+FjZzB68GFt2TG1G58IO3 
> inwOdXitT0qyV9NMoudvAP5GM9GgfYfIV4DqDKvBHyFf0v0Ig0d3hD1TIFnvM40e 
> DIW5EYDbFzMmitZaaczpNWy3ZqzRZeXa6+xePduTHtcCRSPIseUfIT64OsSO5wBf 
> 5HdhlpmMccI4cgNTaOaqhddi3FYLe+ms41dBh8I+FI1uqx/9KqwFR4PIh+uP9b20 
> YouRzFam8o0PlBQru3r4M97ExSS6Q9xk+nno86aPLkVfyxXnZrEYZLHfoOjn91j0 
> oClhNybwxl2XZcDql9YxvQeJ2BHvET6xo/G9vSr3cFwKs4pWXYc+GEvnYJSySFqQ 
> qr5EwLMy3Fvh6rtpUvvcA0+h60JVLtoJd7Z80Jb/5CIFiYLC0FVKd0ACvssQqOal 
> sREipOaV7x0m3Qn36fZYuZ4df9ZTnSW9r8mR2XxkbbhepzoC2BlHoPsJm81V4OCd 
> w1kExCJXy2FhPx5RBfsH 
> =3+Oo 
> -----END PGP SIGNATURE----- 
>

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to