lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Also I forgot to mention.
Both devices know the other's ip (both public ip and local ip) beforehand.

On Fri, Feb 24, 2012 at 9:38 AM, Satheesh Kumar <satheeshrulzz@gmail.com> wrote:
Seems good. But there is a problem here.

I use lua in a game engine where external C libraries are not allowed  :(
I should have been clearer.

So  is there a pure Lua solution for the above? 


On Fri, Feb 24, 2012 at 8:57 AM, Eric Wing <ewmailing@gmail.com> wrote:
I think you want to look at NAT-PMP (NAT Port-Mapping-Protocol) or for
the masochists, UPnP. I see a lot of peer-to-peer software like
Bittorrent clients now support both to deal with NATs.

NAT-PMP draft/spec:
http://files.dns-sd.org/draft-cheshire-nat-pmp.txt

Maybe this library is usable? (No personal experience with it.)
http://miniupnp.free.fr/libnatpmp.html

-Eric

On 2/23/12, Satheesh Kumar <satheeshrulzz@gmail.com> wrote:
> Basically what I want need is this:
>
> Two devices must connect and send data to one another(without an external
> server)  using tcp/udp.
> The devices are behind NAT.
> I read that this may be possible using a method called UDP Hole Punching.
>
> So how do I achieve this? I have a server (seems hole punching requires a
> server) but the actual data transfer must be without using an external
> server.
>
> Any help is appreciated.
>


--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/