neighbor(const char* hostname);
~neighbor();
- const char* get_name() const { return name; }
- const char* get_ctrl_mbox() const { return ctrl_mbox; }
- const char* get_data_mbox() const { return data_mbox; }
+ const char* get_name() const { return name.c_str(); }
+ const char* get_ctrl_mbox() const { return ctrl_mbox.c_str(); }
+ const char* get_data_mbox() const { return data_mbox.c_str(); }
double get_load() const { return load; }
void set_load(double l) { load = l; }
void set_debt(double d) { debt = d; }
private:
- char* name;
- char* ctrl_mbox;
- char* data_mbox;
+ std::string name;
+ std::string ctrl_mbox;
+ std::string data_mbox;
double load;
double debt;