call function
Implementation
Future<dynamic> call(String to,
{dynamic data, String? resp, Duration? timeout}) async {
var rpath = resp ?? '#resp.${++_atomic}';
var f = wait([rpath], sticky: false, timeout: timeout);
publish(to, data: data, rpath: rpath, sticky: false);
var ret = await f;
if (ret is Exception || ret is Error) {
if (ret is StackException) {
throw await Future.error(ret.exception, ret.stackTrace);
} else {
throw ret;
}
}
return ret;
}