[BangPypers] UDP Hole Punching using python

Gora Mohanty gora at mimirtech.com
Fri Feb 25 18:05:33 CET 2011


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,

Regards,
Gora


More information about the BangPypers mailing list