Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Lambda - Parser example
fix_parser parser;
msg_transport::received_msg(transport, [&m](auto &data) {
message m = parser.get_msg(data);
processor.new_msg(m);
});
msg_transport::received_cmd(transport, [&m](auto &data) {
command c = parser.get_msg(data);
admin.new_msg(c);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment