/// <summary> /// Called when the client connection was successful /// /// Note, the event is called on a different thread as /// not to block anything on the current thread /// </summary> /// <param name="sender"></param> /// <param name="pClient"></param> private void ObjClient_Connected(object sender, IConnection.IClient pClient) { Status = ConnectionState.Open; Connected?.Invoke(sender, this); }
/// <summary> /// Called when the client connection was successful /// /// Note, the event is called on a different thread as /// not to block anything on the current thread /// </summary> /// <param name="sender"></param> /// <param name="pClient"></param> private void ObjClient_Connected(object sender, IConnection.IClient pClient) { Task.Run(() => { Connected?.Invoke(sender, this); }); }