namespace simgrid {
namespace mc {
-/** A channel for exchanging messages between model-checker and model-checked
+/** A channel for exchanging messages between model-checker and model-checked app
*
* This abstracts away the way the messages are transferred. Currently, they
* are sent over a (connected) `SOCK_SEQPACKET` socket.
}
public:
- Channel() = default;
explicit Channel(int sock) : socket_(sock) {}
~Channel();
Channel(Channel const&) = delete;
Channel& operator=(Channel const&) = delete;
- // Move:
- Channel(Channel&& that) : socket_(that.socket_) { that.socket_ = -1; }
- Channel& operator=(Channel&& that)
- {
- this->socket_ = that.socket_;
- that.socket_ = -1;
- return *this;
- }
-
// Send
int send(const void* message, size_t size) const;
int send(e_mc_message_type type) const
return this->receive(&m, sizeof(M));
}
- int getSocket() const { return socket_; }
+ int get_socket() const { return socket_; }
};
}
}