storage.hpp 581 B

12345678910111213141516171819
  1. #ifndef __STORAGE_HPP__
  2. #define __STORAGE_HPP__
  3. #include <cstdint>
  4. #include "route.hpp"
  5. // route_init will call this function; no one else should call it
  6. // explicitly. The parameter is the number of messages that can fit in
  7. // the storage-side MsgBuffer. Returns true on success, false on
  8. // failure.
  9. bool storage_init(uint32_t max_users, uint32_t msg_buf_size);
  10. // Handle the messages received by a storage node. Pass a _locked_
  11. // MsgBuffer. This function will itself reset and unlock it when it's
  12. // done with it.
  13. void storage_received(MsgBuffer &storage_buf);
  14. #endif