execute method
Implementation
@override
Future<bool?> execute(
String caller, String propertyOrFunction, List<dynamic> arguments) async {
/// setter
if (scope == null) return null;
String function = propertyOrFunction.toLowerCase().trim();
switch (function) {
case "send":
case "write":
String? message = toStr(elementAt(arguments, 0)) ?? body;
bool? asBinary = toBool(elementAt(arguments, 1));
int? maxPartSize = toInt(elementAt(arguments, 2));
if (!isNullOrEmpty(message)) {
send(message!, asBinary: asBinary, maxPartSize: maxPartSize);
}
return true;
case "read":
case "connect":
return await start();
case "disconnect":
return await stop();
}
return super.execute(caller, propertyOrFunction, arguments);
}