off<T extends DataObject> method
Removes a handler for when a Message of type T
is received from a
connection.
Implementation
void off<T extends DataObject>(MessageHandler<Message<T>> handler) {
for (final subscription
in _subscriptions.whereType<StreamSubscription<Message<T>>>()) {
if (subscription.onData == handler) {
subscription.cancel();
_subscriptions.remove(subscription);
break;
}
}
}