summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-12-09 15:24:23 (GMT)
committerTobias Markmann <tm@ayena.de>2016-01-12 17:42:50 (GMT)
commit13801557b6664426cac26384441ab0b19ff9abb5 (patch)
tree924c5d47e157612e0492f29806910828fe38871f /Swiften/FileTransfer/UnitTest
parente314293415c9691bb98188b514f6b13e33994d86 (diff)
downloadswift-13801557b6664426cac26384441ab0b19ff9abb5.zip
swift-13801557b6664426cac26384441ab0b19ff9abb5.tar.bz2
Listen to IPv6 any address instead of only IPv4
This should enable IPv4/IPv6 dual-stack support for Swift(-en) Jingle file-transfer support. Add Connection::getRemoteAddress() method. Test-Information: Tested IPv6 file-transfer and IPv4 file-transfer between two Swift instances. Added integration test verifying IPv4 only, IPv6 only and IPv4/IPv6 dual-stack support on the running platform. Additionally added test to verify remote addresses on dual-stack server. Change-Id: Ie384a71833eacca554f69e6f12a1c8330d0d747f
Diffstat (limited to 'Swiften/FileTransfer/UnitTest')
-rw-r--r--Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp
index 78ea8ed..a0f6033 100644
--- a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp
+++ b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp
@@ -4,11 +4,11 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
-#include <Swiften/Base/ByteArray.h>
-#include <QA/Checker/IO.h>
-
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
+/*
+ * Copyright (c) 2015 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
#include <boost/bind.hpp>
#include <boost/random/mersenne_twister.hpp>
@@ -16,11 +16,18 @@
#include <boost/random/variate_generator.hpp>
#include <boost/smart_ptr/make_shared.hpp>
+#include <QA/Checker/IO.h>
+
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+
#include <Swiften/Base/Algorithm.h>
#include <Swiften/Base/ByteArray.h>
#include <Swiften/Base/Concat.h>
#include <Swiften/Base/Log.h>
#include <Swiften/Base/StartStopper.h>
+#include <Swiften/Crypto/CryptoProvider.h>
+#include <Swiften/Crypto/PlatformCryptoProvider.h>
#include <Swiften/EventLoop/DummyEventLoop.h>
#include <Swiften/FileTransfer/ByteArrayReadBytestream.h>
#include <Swiften/FileTransfer/ByteArrayWriteBytestream.h>
@@ -30,8 +37,6 @@
#include <Swiften/Network/DummyConnection.h>
#include <Swiften/Network/DummyTimerFactory.h>
#include <Swiften/StringCodecs/Hexify.h>
-#include <Swiften/Crypto/CryptoProvider.h>
-#include <Swiften/Crypto/PlatformCryptoProvider.h>
using namespace Swift;
@@ -278,6 +283,9 @@ private:
}
HostAddressPort getLocalAddress() const { return HostAddressPort(); }
+
+ HostAddressPort getRemoteAddress() const { return HostAddressPort(); }
+
void disconnect() {
disconnectCalled = true;
}