CogProt: A framework for cognitive configuration and optimization of communication protocols