+ instance_->handleMessages();
+ return instance_.get();
+}
+
+void Client::handleDeadlockCheck(mc_message_t* msg)
+{
+ bool deadlock = false;
+ if (not simix_global->process_list.empty()) {
+ deadlock = true;
+ for (auto const& kv : simix_global->process_list)
+ if (simgrid::mc::actor_is_enabled(kv.second)) {
+ deadlock = false;
+ break;
+ }
+ }
+
+ // Send result:
+ mc_message_int_t answer{MC_MESSAGE_DEADLOCK_CHECK_REPLY, deadlock};
+ xbt_assert(channel_.send(answer) == 0, "Could not send response");
+}
+void Client::handleContinue(mc_message_t* msg)
+{
+ /* Nothing to do */
+}
+void Client::handleSimcall(s_mc_message_simcall_handle_t* message)
+{
+ smx_actor_t process = SIMIX_process_from_PID(message->pid);
+ if (not process)
+ xbt_die("Invalid pid %lu", (unsigned long)message->pid);
+ SIMIX_simcall_handle(&process->simcall, message->value);
+ if (channel_.send(MC_MESSAGE_WAITING))
+ xbt_die("Could not send MESSAGE_WAITING to model-checker");
+}
+void Client::handleRestore(s_mc_message_restore_t* message)
+{
+#if HAVE_SMPI
+ smpi_really_switch_data_segment(message->index);
+#endif
+}
+void Client::handleActorEnabled(s_mc_message_actor_enabled_t* msg)
+{
+ bool res = simgrid::mc::actor_is_enabled(SIMIX_process_from_PID(msg->aid));
+ s_mc_message_int answer{MC_MESSAGE_ACTOR_ENABLED_REPLY, res};
+ channel_.send(answer);