[erlang-questions] Using eTorrent UPNP implementation
Wed Mar 14 11:15:51 CET 2012
Edward here. To use etorrent upnp implementation, you need to include
following source files
- add its dependencies, cowboy and lhttpc
- add it to your app.src
- start upnp supervisor when your application starts
Once started, the upnp supervisor will take care of the first step of
upnp protocol, i.e. discovery.
- then you are ready to call whatever upnp actions out there.
Currently etorrent upnp implements one of them, AddPortMapping, as
defined in following specification:
It is also what you are looking for, I believe. The erlang
implementation for it is here:
It is very straightforward to implement other upnp actions modeling after this.
Hope this helps. Fell free to ask questions if you have any.
On Wed, Mar 14, 2012 at 8:20 AM, Naif M. Otaibi <otaibinm@REDACTED> wrote:
> Hey all,
> I have been trying to wrap my head around how upnp is implemented in
> etorrent as I wish to use the implementation to do NAT-traveral for my
> application. The thing is, no documentation exists to help me.
> I've been advised that Edward Wang wrote the code for upnp. If anybody can
> please shed some light on which upnp modules to import in my application and
> which functions to call. I looked at the etorrent_upnp_*.erl files and made
> little sense of them.
> Best regards,
> erlang-questions mailing list
More information about the erlang-questions