onRaw abstract method
Registers callback
as an event handler for the raw event - which is
triggered whenever the server socket calls socket.send(...)
. The object
produced will have a 'message' property.
THIS WILL NOT BE CALLED IF THE DATA CANNOT BE JSON-DECODED. You will need to use onMessage for that.
To cancel the callback, you can call .cancel
on the returned
StreamSubscription.
Implementation
StreamSubscription onRaw(Function(String data) callback);