void send(OpCode code, Uint8List data) { var frame = WebSocketFrame(code, mask: mask, payload: data); var raw = frame.rawBytes(); socket.add(raw.toList()); }