//private static readonly object m_lock02 = new object(); /// <summary> /// 用户退出请求 /// </summary> /// <param name="_obj"></param> /// <param name="_sendback"></param> public static void fns_clientExit(string _obj, I_sendBackClient _sendback) { //lock (m_lock02) //{ I_sendBackClient t_send = _sendback; N_msg_userExit t_userout = JsonMapper.ToObject <N_msg_userExit>(_obj); if (t_userout != null) { new Task(() => { //做些退出处理 I_RemoveClient t_removeClient = S_ClientSocket.M_instance; if (t_removeClient != null) { t_removeClient.fni_remove(t_userout.m_username); I_checkIsLoaded t_checkIsLoaded = S_sql.M_instance; t_checkIsLoaded.fni_remove(t_userout.m_username); } }).Start(); } //} }
/// <summary> /// 学员退出登录 /// </summary> /// <param name="_obj"></param> /// <param name="_sendback"></param> public static void fns_studentExit(string _obj, I_sendBackClient _sendback) { I_sendBackClient t_send = _sendback; N_msg_studentExit t_userout = JsonMapper.ToObject <N_msg_studentExit>(_obj); if (t_userout != null) { new Task(() => { //做些学员退出处理 //I_RemoveClient t_removeClient = S_ClientSocket.M_instance; //if (t_removeClient != null) //{ // t_removeClient.fni_remove(t_userout.m_username); // I_checkIsLoaded t_checkIsLoaded = S_sql.M_instance; // t_checkIsLoaded.fni_remove(t_userout.m_username); //} I_checkIsLoaded t_checkIsLoaded = S_sql.M_instance; t_checkIsLoaded.fni_remove(t_userout.m_username); }).Start(); } }