summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordknn <yoann.blein@free.fr>2012-08-29 11:16:57 (GMT)
committerdknn <yoann.blein@free.fr>2012-09-22 09:34:49 (GMT)
commit949278e9418e4090c2f3c68ed313cf4853b25ef1 (patch)
treef66f927a7325af16cb1e8444b40d06a649d09fb5 /Swiften/FileTransfer/ConnectivityManager.h
parent56b5b129c2fbea3828faaf0cdf882534c2433eff (diff)
downloadswift-contrib-949278e9418e4090c2f3c68ed313cf4853b25ef1.zip
swift-contrib-949278e9418e4090c2f3c68ed313cf4853b25ef1.tar.bz2
Add UDP support in nat traversal
Diffstat (limited to 'Swiften/FileTransfer/ConnectivityManager.h')
-rw-r--r--Swiften/FileTransfer/ConnectivityManager.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/Swiften/FileTransfer/ConnectivityManager.h b/Swiften/FileTransfer/ConnectivityManager.h
index c094c02..c70cb5a 100644
--- a/Swiften/FileTransfer/ConnectivityManager.h
+++ b/Swiften/FileTransfer/ConnectivityManager.h
@@ -25,11 +25,11 @@ public:
ConnectivityManager(NATTraverser*);
~ConnectivityManager();
public:
- void addListeningPort(int port);
- void removeListeningPort(int port);
+ void addListeningPort(int port, NATPortMapping::Protocol protocol);
+ void removeListeningPort(int port, NATPortMapping::Protocol protocol);
- std::vector<HostAddressPort> getHostAddressPorts() const;
- std::vector<HostAddressPort> getAssistedHostAddressPorts() const;
+ std::vector<HostAddressPort> getHostAddressPorts(NATPortMapping::Protocol protocol) const;
+ std::vector<HostAddressPort> getAssistedHostAddressPorts(NATPortMapping::Protocol protocol) const;
private:
void natTraversalGetPublicIPResult(boost::optional<HostAddress> address);
@@ -38,7 +38,8 @@ private:
private:
NATTraverser* natTraversalWorker;
- std::set<int> ports;
+ std::set<int> udpPorts;
+ std::set<int> tcpPorts;
boost::optional<HostAddress> publicAddress;
};