added a length() method for checking message length
This commit is contained in:
		| @@ -36,6 +36,9 @@ namespace chat | |||||||
|  |  | ||||||
|         std::string get_content() const |         std::string get_content() const | ||||||
|         { return _content; } |         { return _content; } | ||||||
|  |  | ||||||
|  |         size_t length() const | ||||||
|  |         { return sizeof(char) + _content.size() + sizeof(char); } | ||||||
|     }; |     }; | ||||||
|  |  | ||||||
|     std::ostream& operator<<(std::ostream& os, const chat_message& msg) |     std::ostream& operator<<(std::ostream& os, const chat_message& msg) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user