onMessage abstract method
Registers callback
as an event handler for the message event - which is
triggered whenever a message is emitted through the socket.
To cancel the callback, you can call .cancel
on the returned
StreamSubscription.
Implementation
StreamSubscription onMessage(Function(String message) callback);