return false;
}
+ // setup
+ /**
+ * Perform any resource allocation, thread startup, etc
+ * that is required before attempting to connect to other
+ * Messengers or transmit messages.
+ *
+ * @return 0 on success; -errno on failure.
+ */
+ virtual int start() = 0;
+
// shutdown
+ /**
+ * Block until the Messenger has finished shutting down (according
+ * to the shutdown() function).
+ * It is valid to call this after calling shutdown(), but it must
+ * be called before deleting the Messenger.
+ */
+ virtual void wait() = 0;
+ /**
+ * Initiate a shutdown of the Messenger.
+ *
+ * @return 0 on success, -errno otherwise.
+ */
virtual int shutdown() = 0;
virtual void suicide() = 0;
int bind(entity_addr_t bind_addr, int64_t nonce);
int start_with_nonce(uint64_t nonce); // if we didn't bind
- int start() { // if we did
+ virtual int start() { // if we did
assert(did_bind);
return start_with_nonce(0);
}
- void wait();
+ virtual void wait();
void set_cluster_protocol(int p) {
cluster_protocol = p;