I'm trying to overwrite OnConnected(), OnDisconnected() methods but I get: OnConnected()': no suitable method found to override
Is implementing IDisconnect, IConnect interfaces and doing my processing within Connect() and Disconnect() the same as OnConnected(), OnDisconnected()?
what gives?
public static class UserHandler
{
public static HashSet<string> ConnectedIds = new HashSet<string>();
}
public class MyHub : Hub
{
public override Task OnConnected()
{
UserHandler.ConnectedIds.Add(Context.ConnectionId);
return base.OnConnected();
}
public override Task OnDisconnected()
{
UserHandler.ConnectedIds.Remove(Context.ConnectionId);
return base.OnDisconnected();
}
}