diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-03-13 13:54:08 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-04-18 19:11:40 (GMT) |
commit | 039636edc1b151431cba21a28986ff2be66b5349 (patch) | |
tree | 0bb5b964806885c9cb1b933d7a5a27480757b630 /Swiften/Network/DummyConnection.h | |
parent | e494f9a206cbb44903f3a032f858b0ef35a039d1 (diff) | |
download | swift-contrib-01e742fc45051a2a481b430b779e40d0e936a07a.zip swift-contrib-01e742fc45051a2a481b430b779e40d0e936a07a.tar.bz2 |
Cleaned up includes.swift-2.0alpha
Diffstat (limited to 'Swiften/Network/DummyConnection.h')
-rw-r--r-- | Swiften/Network/DummyConnection.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/Swiften/Network/DummyConnection.h b/Swiften/Network/DummyConnection.h index 6b426b1..e8cc48b 100644 --- a/Swiften/Network/DummyConnection.h +++ b/Swiften/Network/DummyConnection.h @@ -6,26 +6,20 @@ #pragma once -#include <cassert> -#include <boost/bind.hpp> #include <boost/enable_shared_from_this.hpp> #include "Swiften/Network/Connection.h" +#include "Swiften/Network/HostAddressPort.h" #include "Swiften/EventLoop/EventLoop.h" #include "Swiften/EventLoop/EventOwner.h" namespace Swift { class DummyConnection : public Connection, public EventOwner, public boost::enable_shared_from_this<DummyConnection> { public: - DummyConnection(EventLoop* eventLoop) : eventLoop(eventLoop) {} + DummyConnection(EventLoop* eventLoop); - void listen() { - assert(false); - } - - void connect(const HostAddressPort&) { - assert(false); - } + void listen(); + void connect(const HostAddressPort&); void disconnect() { //assert(false); @@ -36,9 +30,7 @@ namespace Swift { onDataSent(data); } - void receive(const ByteArray& data) { - eventLoop->postEvent(boost::bind(boost::ref(onDataRead), ByteArray(data)), shared_from_this()); - } + void receive(const ByteArray& data); HostAddressPort getLocalAddress() const { return localAddress; |