push method

void push(
  1. Object message
)

Sends the client a text (String) or binary (List<int>) message, as the server would. Throws a StateError once the connection is closed.

Implementation

void push(Object message) {
  if (isClosed) {
    throw StateError('The connection is closed');
  }
  _incoming.add(
    message is List<int> && message is! Uint8List
        ? Uint8List.fromList(message)
        : message,
  );
}