-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Dyshay edited this page Feb 1, 2020
·
5 revisions
CLI :
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);
- CLIiD = the ID of cli
- NewConnection is the function on client
- The others params, it's about the function
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