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/Network/FakeConnection.h
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/Network/FakeConnection.h')
-rw-r--r--Swiften/Network/FakeConnection.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/Swiften/Network/FakeConnection.h b/Swiften/Network/FakeConnection.h
index 33a7fd9..ec62ad7 100644
--- a/Swiften/Network/FakeConnection.h
+++ b/Swiften/Network/FakeConnection.h
@@ -1,20 +1,21 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/optional.hpp>
-#include <boost/enable_shared_from_this.hpp>
#include <vector>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/optional.hpp>
+
#include <Swiften/Base/API.h>
+#include <Swiften/EventLoop/EventLoop.h>
+#include <Swiften/EventLoop/EventOwner.h>
#include <Swiften/Network/Connection.h>
#include <Swiften/Network/HostAddressPort.h>
-#include <Swiften/EventLoop/EventOwner.h>
-#include <Swiften/EventLoop/EventLoop.h>
namespace Swift {
class SWIFTEN_API FakeConnection :
@@ -31,12 +32,15 @@ namespace Swift {
};
FakeConnection(EventLoop* eventLoop);
- ~FakeConnection();
+ virtual ~FakeConnection();
virtual void listen();
virtual HostAddressPort getLocalAddress() const {
return HostAddressPort();
}
+ virtual HostAddressPort getRemoteAddress() const {
+ return HostAddressPort();
+ }
void setError(const Error& e);
virtual void connect(const HostAddressPort& address);