A simple protocol validation server in python