writeMessage method
Writes the specified HubMessage to a string and returns it.
message The message to write. Returns a string containing the serialized representation of the message.
Implementation
@override
Object writeMessage(HubMessage message) {
final output = json.encode(message);
return TextMessageFormat.write(output);
}