libiqxmlrpc  0.12.4
 All Classes Namespaces Files Functions Typedefs Enumerations
reactor_select_impl.h
1 // Libiqxmlrpc - an object-oriented XML-RPC solution.
2 // Copyright (C) 2011 Anton Dedov
3 
4 #ifndef _iqxmlrpc_reactor_select_impl_h_
5 #define _iqxmlrpc_reactor_select_impl_h_
6 
7 #ifndef HAVE_POLL
8 #include "reactor.h"
9 
10 #include <boost/utility.hpp>
11 
12 namespace iqnet
13 {
14 
15 #ifdef _MSC_VER
16 #pragma warning(push)
17 #pragma warning(disable: 4251)
18 #pragma warning(disable: 4275)
19 #endif
20 
22 class LIBIQXMLRPC_API Reactor_select_impl: boost::noncopyable {
23  Socket::Handler max_fd;
24  fd_set read_set, write_set, err_set;
25  Reactor_base::HandlerStateList hs;
26 
27 public:
29  virtual ~Reactor_select_impl();
30 
31  void reset(const Reactor_base::HandlerStateList&);
32  bool poll(Reactor_base::HandlerStateList& out, Reactor_base::Timeout);
33 };
34 
35 #ifdef _MSC_VER
36 #pragma warning(pop)
37 #endif
38 
39 } // namespace iqnet
40 
41 #endif // not defined HAVE_POLL
42 #endif