summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Network/BoostUDPSocketFactory.cpp')
-rw-r--r--Swiften/Network/BoostUDPSocketFactory.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/Swiften/Network/BoostUDPSocketFactory.cpp b/Swiften/Network/BoostUDPSocketFactory.cpp
new file mode 100644
index 0000000..6cd6949
--- /dev/null
+++ b/Swiften/Network/BoostUDPSocketFactory.cpp
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 Yoann Blein
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#include <Swiften/Network/BoostUDPSocketFactory.h>
+
+#include <Swiften/Network/BoostUDPSocket.h>
+
+namespace Swift {
+
+BoostUDPSocketFactory::BoostUDPSocketFactory(boost::shared_ptr<boost::asio::io_service> ioService, EventLoop* eventLoop) : ioService(ioService), eventLoop(eventLoop) {
+}
+
+BoostUDPSocketFactory::~BoostUDPSocketFactory()
+{
+}
+
+boost::shared_ptr<UDPSocket> BoostUDPSocketFactory::createUDPSocket() {
+ return BoostUDPSocket::create(ioService, eventLoop);
+}
+
+}