Original Post
I'm building my messaging infrastructure. I want to post messages to the server, have it 'do something' then respond with an ack or data that might be relevant. I plan to send a message over the network, wait for a response then when I get it back be able to relate the response to the original request. The original requestor class is then called back in order to get the data. This seems to be awfully close to what I would expect to be a design pattern. Does one exist or is there a batter way to do this? Second minor question, should I use a std::list to store the Requestor callbacks and use the iterator in the network request, so that when I get the response I can relate it back to the original request(or)? I'm pretty sure I can do delete's from within a list and iterators remain valid unlike a vector. Thoughts and comments are welcome as once I implement this I think it'll be pretty embedded and unlikely to change going forwards... Thanks Guys...