send method
Invokes a hub method on the server using the specified name and arguments. Does not wait for a response from the receiver.
The Promise returned by this method resolves when the client has sent the invocation to the server. The server may still be processing the invocation.
methodName: The name of the server method to invoke. args: The arguments used to invoke the server method. Returns a Promise that resolves when the invocation has been successfully sent, or rejects with an error.
Implementation
Future<void> send(String methodName, {List<Object>? args}) {
args = args ?? [];
final t = _replaceStreamingParams(args);
final sendPromise =
_sendWithProtocol(_createInvocation(methodName, args, true, t.item2));
_launchStreams(t.item1, sendPromise);
return sendPromise;
}