[BangPypers] UDP Hole Punching using python

kunal ghosh kunal.t2 at gmail.com
Sat Feb 26 05:16:17 CET 2011


On Fri, Feb 25, 2011 at 10:35 PM, Gora Mohanty <gora at mimirtech.com> wrote:

> On 2/25/11, kunal ghosh <kunal.t2 at gmail.com> wrote:
> > Hi all, i am working on UDP hole punching to allow communication between
> two
> > computers hidden
> > behind their respective NATs (Home Router).
> [...]
> > Now i try to do the same thing using python and sockets,
> > step 1: holepunch , send UDP packet from receiver to sender
> [...]
>
> It has been a while since I have had occasion to play with sockets
> (sigh!), but an errno 22 (EINVAL) is usually a generic failure to
> connect. Are you sure that something is not blocking access?
> I would suggest trying to first test your code on localhost: Here
> is an example Google Mama was kind enough to turn up:
> http://www.evolt.org/node/60276,
>

Thanks Gora,
The link was very useful, but the main problem was that i had to bind the
sending socket to
a specified host and a port, that was the root of my problem. Binding the
sending socket to
"0.0.0.0" worked :)


>
> Regards,
> Gora
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
regards
-------
Kunal Ghosh
Dept of Computer Sc. & Engineering.
Sir MVIT
Bangalore,India

permalink: member.acm.org/~kunal.t2
Blog:kunalghosh.wordpress.com
Website:www.kunalghosh.net46.net


More information about the BangPypers mailing list