PageRenderTime 282ms CodeModel.GetById 191ms app.highlight 1ms RepoModel.GetById 49ms app.codeStats 14ms

/thirdparty/libportfwd/README

http://github.com/tomahawk-player/tomahawk
#! | 29 lines | 22 code | 7 blank | 0 comment | 0 complexity | 98fa82b051f7e9ad3f291c5e260172c3 MD5 | raw file
 1libportfwd
 2----------
 3A basic, lightweight c++ wrapper around miniupnp and nat-pmp libraries
 4for setting up port fwds, detecting max up/downstream bandwidth, and 
 5finding out external IP address.
 6
 7See: http://miniupnp.free.fr/
 8
 9Designed to wrap up miniupnpc+natpmp libs into a static lib with a small API
10so other projects can easily setup port fwds without shipping extra libs/deps.
11
12Should detect any upnp or nat-pmp router and automatically use the appropriate
13library under the hood.
14
15Uses cmake to build needed bits of miniupnpc.
16
17NB/TODO
18-------
19I don't have a nat-pmp capable device (eg: Airport Express)
20so haven't implemented that bit yet. Only supports upnp atm.
21
22Usage
23-----
24See the demo in main.cpp, but here's the jist:
25
26 Portfwd pf;
27 pf.init(2000);   // 2000 = ms to wait for response from router
28 pf.add(1234);    // port to fwd to you
29 pf.remove(1234); // remove port fwding on exit