summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-04-08 17:25:21 (GMT)
committerSwift Review <review@swift.im>2013-04-11 19:20:50 (GMT)
commit4ec2390efec7cfdd411c7bb14e9f77ec9ee5c005 (patch)
treeb52419c9c08419cef8609fc5ed0e8bb9f03f1c02 /Swiften/Network/BoostConnectionServer.h
parent7d9c895ba6f1cdb56925a5313b989ecb2c5217fa (diff)
downloadswift-4ec2390efec7cfdd411c7bb14e9f77ec9ee5c005.zip
swift-4ec2390efec7cfdd411c7bb14e9f77ec9ee5c005.tar.bz2
Network refactoring.
Provide sync connection server start method. Provide NetworkEnvironment through NetworkFactories. Change-Id: Iea04349255af8aa6326968f17653e8e371a08bdd
Diffstat (limited to 'Swiften/Network/BoostConnectionServer.h')
-rw-r--r--Swiften/Network/BoostConnectionServer.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/Swiften/Network/BoostConnectionServer.h b/Swiften/Network/BoostConnectionServer.h
index 66af2a4..3ad0450 100644
--- a/Swiften/Network/BoostConnectionServer.h
+++ b/Swiften/Network/BoostConnectionServer.h
@@ -16,17 +16,13 @@
#include <Swiften/Network/BoostConnection.h>
#include <Swiften/Network/ConnectionServer.h>
#include <Swiften/EventLoop/EventOwner.h>
+#include <boost/optional/optional_fwd.hpp>
namespace Swift {
class SWIFTEN_API BoostConnectionServer : public ConnectionServer, public EventOwner, public boost::enable_shared_from_this<BoostConnectionServer> {
public:
typedef boost::shared_ptr<BoostConnectionServer> ref;
- enum Error {
- Conflict,
- UnknownError
- };
-
static ref create(int port, boost::shared_ptr<boost::asio::io_service> ioService, EventLoop* eventLoop) {
return ref(new BoostConnectionServer(port, ioService, eventLoop));
}
@@ -35,6 +31,7 @@ namespace Swift {
return ref(new BoostConnectionServer(address, port, ioService, eventLoop));
}
+ virtual boost::optional<Error> tryStart(); // FIXME: This should become the new start
virtual void start();
virtual void stop();