diff options
author | dknn <yoann.blein@free.fr> | 2012-07-08 20:23:27 (GMT) |
---|---|---|
committer | dknn <yoann.blein@free.fr> | 2012-09-22 08:55:56 (GMT) |
commit | dc259819a687fa9a6f9007ed15b443f737c5d473 (patch) | |
tree | b3322e7902705923cfe85d5a67e4bfda9697f3c3 /Swiften/Network/BoostUDPSocketFactory.h | |
parent | 9928de47c73430b4ed37db8a0cfb44adecc3e296 (diff) | |
download | swift-contrib-dc259819a687fa9a6f9007ed15b443f737c5d473.zip swift-contrib-dc259819a687fa9a6f9007ed15b443f737c5d473.tar.bz2 |
Udp stuff
Diffstat (limited to 'Swiften/Network/BoostUDPSocketFactory.h')
-rw-r--r-- | Swiften/Network/BoostUDPSocketFactory.h | 28 |
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; + }; +} |