COnMessageListener typedef
Message handler that receives a JSON object with two fields. "type" which equals either "error" or "data". Then "data" which contains the actual data received.
Implementation
typedef COnMessageListener = Future<void> Function(CObject);