//后台程序监听该端口的登录情况 private static void login(object obj) { Socket client = obj as Socket; dataProcessing listenData = new dataProcessing(client); listenData.receiveData(); }
//删除在线账号 public static void removeDictionary(dataProcessing s) { lock (new object()) { clientList.Remove(s.socket); } form.delListItem(s.userName); }
//添加在线账号 public static void addDictionary(dataProcessing dataprocessing) { lock (new object()) { clientList.Add(dataprocessing.socket, dataprocessing); } form.addListItem(dataprocessing.userName); }