onWrapper method

  1. @override
void onWrapper(
  1. WrappedMessage wrapper,
  2. SocketInfo source
)
inherited

A callback for when messages are received.

Implementation

@override
void onWrapper(WrappedMessage wrapper, SocketInfo source) {
  if (wrapper.name == UpdateSetting().messageName) {
    final settings = UpdateSetting.fromBuffer(wrapper.data);
    updateSettings(settings);
  } else {
    super.onWrapper(wrapper, source);
  }
}