Using a std::deque to store the queries retains the exact state of the object thus removing the need to parse the query again. It also removes the need to split the queue into individual packets which makes the code cleaner.