+#ifndef SIMGRID_MC_CLIENT_H
+#define SIMGRID_MC_CLIENT_H
+
+#include <cstddef>
+
+#include <memory>
+
+#include <xbt/base.h>
+
+#include "src/mc/mc_protocol.h"
+#include "src/mc/Channel.hpp"
+
+namespace simgrid {
+namespace mc {
+
+class XBT_PUBLIC() Client {
+private:
+ bool active_ = false;
+ Channel channel_;
+ static std::unique_ptr<Client> client_;
+public:
+ Client();
+ Client(int fd) : active_(true), channel_(fd) {}
+ void handleMessages();
+ Channel const& getChannel() const { return channel_; }
+ Channel& getChannel() { return channel_; }
+ void mainLoop(void);
+
+ // Singleton :/
+ // TODO, remove the singleton antipattern.
+ static Client* initialize();
+ static Client* get()
+ {
+ return client_.get();
+ }
+};
+
+}
+}