diff options
author | Tobias Markmann <tm@ayena.de> | 2015-03-08 15:36:49 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2015-05-01 17:14:55 (GMT) |
commit | 794fec2873e69ec047974416768b32b69754dad1 (patch) | |
tree | a3cc8cb221e9ee7ad5c40a9de0ccc03e5f9d9562 /Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h | |
parent | d7bc3a37f4bb261c8520a8ddedcda2369f97361c (diff) | |
download | swift-794fec2873e69ec047974416768b32b69754dad1.zip swift-794fec2873e69ec047974416768b32b69754dad1.tar.bz2 |
Add resource management for S5B server and port forwardings
This patchs adds management of the SOCKS5 bytestream server and port
forwarding setup to Swiften. The first file-transfer, regardless of
incoming or outgoing transfer, will start and initialize the S5B server
and if configured try to set up port forwarding. The last file-transfer
to finish will will close the server and remove the port forwarding.
Test-Information:
Tested with upcoming ConcurrentFileTransferTest.cpp and running multiple
S5B file-transfers in parallel.
Change-Id: Idd09d3d0ef9498fc9435b0aee81f2b1061783342
Diffstat (limited to 'Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h')
-rw-r--r-- | Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h index ed2b4f0..bbf17a1 100644 --- a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h +++ b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h @@ -26,6 +26,8 @@ namespace Swift { class SOCKS5BytestreamServerManager; class SOCKS5BytestreamProxiesManager; class SOCKS5BytestreamServerInitializeRequest; + class SOCKS5BytestreamServerResourceUser; + class SOCKS5BytestreamServerPortForwardingUser; class JingleS5BTransportPayload; class LocalJingleTransportCandidateGenerator { @@ -45,6 +47,7 @@ namespace Swift { private: void handleS5BServerInitialized(bool success); + void handlePortForwardingSetup(bool success); void handleDiscoveredProxiesChanged(); void checkS5BCandidatesReady(); @@ -56,6 +59,11 @@ namespace Swift { JID ownJID; IDGenerator* idGenerator; boost::shared_ptr<SOCKS5BytestreamServerInitializeRequest> s5bServerInitializeRequest; + boost::shared_ptr<SOCKS5BytestreamServerResourceUser> s5bServerResourceUser_; + boost::shared_ptr<SOCKS5BytestreamServerPortForwardingUser> s5bServerPortForwardingUser_; + bool triedServerInit_; + bool triedForwarding_; + bool triedProxyDiscovery_; FileTransferOptions options_; }; } |