CLI : await Connection.InvokeAsync("ReceivedHandler", package, tcpId);
await Connection.InvokeAsync("ReceivedHandler", package, tcpId);
The first params in string is the name of the function
await Clients.Client(CliID).SendAsync("NewConnection", "34.251.172.139", 443, false, tcpId);
public event Action<string, int, bool, string> ConnexionHandler;
Connection.On<string, int, bool, string>("NewConnection", (ip, port, @switch, tcpId) => ConnexionHandler?.Invoke(ip, port, @switch, tcpId));
You need to use a action delegate to dispatch the information
Where apply a method to delete and init this for start the handle
https://github.com/Dyshay/DeepBot/blob/dev/DeepBot.CLI/Service/TalkHubService.cs