Support persistent connection for server.

This commit is contained in:
Chunting Gu
2019-03-25 18:16:58 +08:00
parent 6c4ac75c35
commit 6c5dedb807
24 changed files with 193 additions and 72 deletions
+5
View File
@@ -41,6 +41,11 @@ public:
return message;
}
void Clear() {
std::lock_guard<std::mutex> lock(mutex_);
message_list_.clear();
}
void Push(const T& message) {
{
std::lock_guard<std::mutex> lock(mutex_);