refactor: Move port mapping code to its own module

This commit does not change behavior.
This commit is contained in:
Hennadii Stepanov
2020-02-06 19:00:26 +02:00
parent 4b8b71e630
commit 02ccf69dd6
8 changed files with 163 additions and 135 deletions

View File

@@ -67,12 +67,6 @@ static const int MAX_BLOCK_RELAY_ONLY_CONNECTIONS = 2;
static const int MAX_FEELER_CONNECTIONS = 1;
/** -listen default */
static const bool DEFAULT_LISTEN = true;
/** -upnp default */
#ifdef USE_UPNP
static const bool DEFAULT_UPNP = USE_UPNP;
#else
static const bool DEFAULT_UPNP = false;
#endif
/** The maximum number of peer connections to maintain. */
static const unsigned int DEFAULT_MAX_PEER_CONNECTIONS = 125;
/** The default for -maxuploadtarget. 0 = Unlimited */
@@ -181,9 +175,6 @@ enum class ConnectionType {
};
void Discover();
void StartMapPort();
void InterruptMapPort();
void StopMapPort();
uint16_t GetListenPort();
enum