Junxiao Shi | c041ca3 | 2014-02-25 20:01:15 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2014 Named Data Networking Project |
| 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 7 | #ifndef NFD_CORE_GLOBAL_IO_HPP |
| 8 | #define NFD_CORE_GLOBAL_IO_HPP |
| 9 | |
| 10 | #include "common.hpp" |
| 11 | |
| 12 | namespace nfd { |
| 13 | |
| 14 | /** \return the global io_service instance |
| 15 | */ |
| 16 | boost::asio::io_service& |
| 17 | getGlobalIoService(); |
| 18 | |
| 19 | #ifdef WITH_TESTS |
| 20 | /** \brief delete the global io_service instance |
| 21 | * |
| 22 | * It will be recreated at the next invocation of getGlobalIoService. |
| 23 | */ |
| 24 | void |
| 25 | resetGlobalIoService(); |
| 26 | #endif |
| 27 | |
| 28 | } // namespace nfd |
| 29 | |
| 30 | #endif // NFD_CORE_GLOBAL_IO_HPP |