writeMessage method

  1. @override
String writeMessage(
  1. HubMessageBase message
)
override

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
String writeMessage(HubMessageBase message) {
  var jsonObj = _messageAsMap(message);
  return TextMessageFormat.write(json.encode(jsonObj));
}