summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordknn <yoann.blein@free.fr>2012-07-08 20:23:27 (GMT)
committerdknn <yoann.blein@free.fr>2012-09-22 08:55:56 (GMT)
commitdc259819a687fa9a6f9007ed15b443f737c5d473 (patch)
treeb3322e7902705923cfe85d5a67e4bfda9697f3c3 /Swiften/Network/BoostUDPSocketFactory.h
parent9928de47c73430b4ed37db8a0cfb44adecc3e296 (diff)
downloadswift-contrib-dc259819a687fa9a6f9007ed15b443f737c5d473.zip
swift-contrib-dc259819a687fa9a6f9007ed15b443f737c5d473.tar.bz2
Udp stuff
Diffstat (limited to 'Swiften/Network/BoostUDPSocketFactory.h')
-rw-r--r--Swiften/Network/BoostUDPSocketFactory.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/Swiften/Network/BoostUDPSocketFactory.h b/Swiften/Network/BoostUDPSocketFactory.h
new file mode 100644
index 0000000..50dc588
--- /dev/null
+++ b/Swiften/Network/BoostUDPSocketFactory.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2012 Yoann Blein
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#pragma once
+
+#include <Swiften/Network/UDPSocketFactory.h>
+#include <boost/asio/io_service.hpp>
+#include <boost/shared_ptr.hpp>
+
+namespace Swift {
+ class BoostUDPSocket;
+ class EventLoop;
+
+ class BoostUDPSocketFactory : public UDPSocketFactory {
+ public:
+ BoostUDPSocketFactory(boost::shared_ptr<boost::asio::io_service> ioService, EventLoop* eventLoop);
+ virtual ~BoostUDPSocketFactory();
+
+ virtual boost::shared_ptr<UDPSocket> createUDPSocket();
+
+ private:
+ boost::shared_ptr<boost::asio::io_service> ioService;
+ EventLoop* eventLoop;
+ };
+}