Storage: generate messages rather than intermediate updates.

This commit is contained in:
Peter Johnson
2015-07-31 13:21:19 -07:00
parent a127bca0e4
commit 138ebf5b4d
4 changed files with 528 additions and 435 deletions

View File

@@ -116,8 +116,6 @@ void Dispatcher::Flush() {
}
void Dispatcher::DispatchThreadMain() {
Storage& storage = Storage::GetInstance();
// local copy of active m_connections
struct ConnectionRef {
NetworkConnection* net;
@@ -160,20 +158,6 @@ void Dispatcher::DispatchThreadMain() {
}
}
// grab local storage updates
Storage::UpdateMap updates;
bool delete_all;
storage.GetUpdates(&updates, &delete_all);
// local entry updates
for (auto& update_entry : updates) {
auto update = update_entry.getValue();
switch (update.kind) {
default:
break;
}
}
// scan outgoing messages to remove unnecessary updates
// send outgoing messages