summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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;
+ };
+}