onMessage method

void onMessage(
  1. MessageSocket fn
)

Implementation

void onMessage(MessageSocket fn) {
  throw 'To use sockets you need dart:io or dart:html';
}