Joel Grunbaum
2022-01-11 4fdb65896bb30efb30fb22342e5b44dd481250dd
protocol.hpp
@@ -10,12 +10,13 @@
{
enum OrderEnum { ADD, DELETE, BROKER_REQUEST, BROKER_CONFIRM };
    // Catchup utilities
// Catchup utilities
std::unordered_map<std::string, book::Book> recoverBook();
void catchUp(std::unordered_map<std::string, book::Book>& bs);
    // Outgoing messages
    void addOrder(json::AddMessage& order);
    void deleteOrder(json::DeleteMessage& order);
// Outgoing messages
json::Message* addOrder(json::AddMessage& order);
json::Message* deleteOrder(json::DeleteMessage& order);
// Incoming messages
void handleMessage(std::unordered_map<std::string, book::Book>& bs,
@@ -25,13 +26,13 @@
void settle(std::unordered_map<std::string, book::Book>& bs,
            json::SettleMessage* message);
void addedOrder(std::unordered_map<std::string, book::Book>& bs,
              json::AddedMessage* message);
                json::AddedMessage* message);
void deletedOrder(std::unordered_map<std::string, book::Book>& bs,
                 json::DeletedMessage* message);
                  json::DeletedMessage* message);
void tradeOrder(std::unordered_map<std::string, book::Book>& bs,
                json::TradeMessage* message);
void broker(std::unordered_map<std::string, book::Book>& bs,
            json::Broker* message);
    void send(std::string& message);
json::Message* send(std::string& message);
} // namespace protocol