summaryrefslogtreecommitdiffstats
blob: 50dc5889da26aa00abad9f15725002591b8946a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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;
	};
}