Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MC: rename remote/EventLoop into remote/CheckerSide
[simgrid.git] / src / mc / remote / CheckerSide.hpp
1 /* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SIMGRID_MC_REMOTE_EVENTLOOP_HPP
7 #define SIMGRID_MC_REMOTE_EVENTLOOP_HPP
8
9 #include <event2/event.h>
10 #include <functional>
11
12 namespace simgrid {
13 namespace mc {
14
15 class CheckerSide {
16   struct event_base* base_    = nullptr;
17   struct event* socket_event_ = nullptr;
18   struct event* signal_event_ = nullptr;
19
20 public:
21   ~CheckerSide();
22
23   void start(int socket, void (*handler)(int, short, void*));
24   void dispatch();
25   void break_loop();
26 };
27
28 } // namespace mc
29 } // namespace simgrid
30
31 #endif