/usr/include/pion/tcp/timer.hpp is in libpion-dev 5.0.4+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85  | // ---------------------------------------------------------------------
// pion:  a Boost C++ framework for building lightweight HTTP interfaces
// ---------------------------------------------------------------------
// Copyright (C) 2007-2012 Cloudmeter, Inc.  (http://www.cloudmeter.com)
//
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
//
#ifndef __PION_TCP_TIMER_HEADER__
#define __PION_TCP_TIMER_HEADER__
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/thread/mutex.hpp>
#include <pion/config.hpp>
#include <pion/tcp/connection.hpp>
namespace pion {    // begin namespace pion
namespace tcp {     // begin namespace tcp
///
/// timer: helper class used to time-out TCP connections
///
class timer
    : public boost::enable_shared_from_this<timer>
{
public:
    /**
     * creates a new TCP connection timer
     *
     * @param conn_ptr pointer to TCP connection to monitor
     */
    timer(tcp::connection_ptr& conn_ptr);
    /**
     * starts a timer for closing a TCP connection
     *
     * @param seconds number of seconds before the timeout triggers
     */
    void start(const boost::uint32_t seconds);
    /// cancel the timer (operation completed)
    void cancel(void);
private:
    /**
     * Callback handler for the deadline timer
     *
     * @param ec deadline timer error status code
     */
    void timer_callback(const boost::system::error_code& ec);
    /// pointer to the TCP connection that is being monitored
    tcp::connection_ptr                     m_conn_ptr;
    /// deadline timer used to timeout TCP operations
    boost::asio::deadline_timer             m_timer;
    
    /// mutex used to synchronize the TCP connection timer
    boost::mutex                            m_mutex;
    /// true if the deadline timer is active
    bool                                    m_timer_active; 
    /// true if the timer was cancelled (operation completed)
    bool                                    m_was_cancelled;    
};
/// shared pointer to a timer object
typedef boost::shared_ptr<timer>     timer_ptr;
}   // end namespace tcp
}   // end namespace pion
#endif
 |