Sirikata
|
00001 // Copyright (c) 2011 Sirikata Authors. All rights reserved. 00002 // Use of this source code is governed by a BSD-style license that can 00003 // be found in the LICENSE file. 00004 00005 #ifndef _SIRIKATA_CORE_POLLER_SERVICE_HPP_ 00006 #define _SIRIKATA_CORE_POLLER_SERVICE_HPP_ 00007 00008 #include <sirikata/core/service/Poller.hpp> 00009 #include <sirikata/core/service/Service.hpp> 00010 00011 namespace Sirikata { 00012 00018 class SIRIKATA_EXPORT PollerService : public Poller, public Service { 00019 public: 00020 PollerService(Network::IOStrand* str, const Network::IOCallback& cb, const char* cb_tag, const Duration& max_rate = Duration::microseconds(0), bool accurate = false) 00021 : Poller(str, cb, cb_tag, max_rate, accurate) 00022 {} 00023 virtual ~PollerService() {} 00024 00025 virtual void start() { 00026 Poller::start(); 00027 } 00028 virtual void stop() { 00029 Poller::stop(); 00030 } 00031 }; // class Poller 00032 00033 } // namespace Sirikata 00034 00035 #endif //_SIRIKATA_CORE_POLLER_SERVICE_HPP_