diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-07-19 11:44:20 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-07-19 11:59:04 (GMT) |
commit | 1de12ed346fc0018527afe082886129088e27a95 (patch) | |
tree | 16013a9294588f505a559a99fe27a603584f2ac2 /Swiften/QA/NetworkTest | |
parent | 5d504472c63b7acaa7df99ff1097024cf463f1bd (diff) | |
download | swift-1de12ed346fc0018527afe082886129088e27a95.zip swift-1de12ed346fc0018527afe082886129088e27a95.tar.bz2 |
(Client)Session & Connection refactoring.
ClientSession no longer sets up a connection.
Connection no longer resolves addresses.
Diffstat (limited to 'Swiften/QA/NetworkTest')
-rw-r--r-- | Swiften/QA/NetworkTest/BoostConnectionTest.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Swiften/QA/NetworkTest/BoostConnectionTest.cpp b/Swiften/QA/NetworkTest/BoostConnectionTest.cpp index e38b895..9929eaa 100644 --- a/Swiften/QA/NetworkTest/BoostConnectionTest.cpp +++ b/Swiften/QA/NetworkTest/BoostConnectionTest.cpp @@ -5,9 +5,13 @@ #include "Swiften/Base/String.h" #include "Swiften/Base/sleep.h" #include "Swiften/Network/BoostConnection.h" +#include "Swiften/Network/HostAddress.h" +#include "Swiften/Network/HostAddressPort.h" #include "Swiften/Network/BoostIOServiceThread.h" #include "Swiften/EventLoop/DummyEventLoop.h" +const unsigned char* address = reinterpret_cast<const unsigned char*>("\x41\x63\xde\x89"); + using namespace Swift; class BoostConnectionTest : public CppUnit::TestFixture { @@ -31,16 +35,15 @@ class BoostConnectionTest : public CppUnit::TestFixture { void testDestructor() { { - std::string domain("el-tramo.be"); boost::shared_ptr<BoostConnection> testling(new BoostConnection(&boostIOServiceThread_->getIOService())); - testling->connect(domain); + testling->connect(HostAddressPort(HostAddress(address, 4), 5222)); } } void testDestructor_PendingEvents() { { boost::shared_ptr<BoostConnection> testling(new BoostConnection(&boostIOServiceThread_->getIOService())); - testling->connect("el-tramo.be"); + testling->connect(HostAddressPort(HostAddress(address, 4), 5222)); while (!eventLoop_->hasEvents()) { Swift::sleep(10); } |