mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
moved UPnP instance to Transports. Use actual port from RouterContext
This commit is contained in:
parent
7c13194d5a
commit
2442d0e910
5 changed files with 33 additions and 33 deletions
8
UPnP.h
8
UPnP.h
|
@ -19,7 +19,7 @@
|
|||
|
||||
namespace i2p
|
||||
{
|
||||
namespace UPnP
|
||||
namespace transport
|
||||
{
|
||||
class UPnP
|
||||
{
|
||||
|
@ -33,8 +33,8 @@ namespace UPnP
|
|||
void Stop ();
|
||||
|
||||
void Discover ();
|
||||
void TryPortMapping (int type);
|
||||
void CloseMapping (int type);
|
||||
void TryPortMapping (int type, int port);
|
||||
void CloseMapping (int type, int port);
|
||||
private:
|
||||
void Run ();
|
||||
|
||||
|
@ -49,14 +49,12 @@ namespace UPnP
|
|||
char m_NetworkAddr[64];
|
||||
char m_externalIPAddress[40];
|
||||
bool m_IsModuleLoaded;
|
||||
std::string m_Port = std::to_string (util::config::GetArg ("-port", 17070));
|
||||
#ifndef _WIN32
|
||||
void *m_Module;
|
||||
#else
|
||||
HINSTANCE *m_Module;
|
||||
#endif
|
||||
};
|
||||
extern UPnP upnpc;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue