資源簡介
主要實現簡單的用戶的注冊、登錄、退出功能;由服務器轉發用戶發來的用戶狀態信息、私聊信息,公聊信息,請求發送文件信息、文件發送響應信息;服務器轉發文件發送信息和文件響應信息,然后兩個客戶端直接建立socket連接來發送文件,用戶可以選擇是否接收文件;服務器端可以從數據庫刪除已注冊的用戶,并給其他用戶發送用戶下線信息,已刪除的用戶不能再發送信息等功能。
詳情見:https://blog.csdn.net/wmrem/article/details/79904251

代碼片段和文件信息
@SuppressWarnings(“serial“)
public?class?ChatMessage?extends?Message?{
private?String?msgContent;//聊天內容
public?ChatMessage(String?srcUser?String?dstUserString?msgContent)?{
super(srcUser?dstUser);//調用父類的構造方法,只能放在構造方法的第一行
this.msgContent?=?msgContent;
//?TODO?Auto-generated?constructor?stub
}
public?String?getMsgContent()?{
return?msgContent;
}
public?void?setMsgContent(String?msgContent)?{
this.msgContent?=?msgContent;
}
public?boolean?isPubChatMessage()?{
return?getDstUser().equals(““);//收信人為空時表示廣播信息
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????1447237??2018-12-04?15:26??網絡聊天程序\網絡聊天程序設計報告.docx
?????目錄???????????0??2018-07-05?09:44??網絡聊天程序\
?????目錄???????????0??2018-07-05?09:28??網絡聊天程序\Chat\
?????文件?????????391??2018-07-05?09:14??網絡聊天程序\Chat\.classpath
?????文件?????????380??2018-07-05?09:32??網絡聊天程序\Chat\.project
?????目錄???????????0??2018-07-05?09:28??網絡聊天程序\Chat\.settings\
?????文件?????????598??2018-03-24?12:46??網絡聊天程序\Chat\.settings\org.eclipse.jdt.core.prefs
?????目錄???????????0??2018-07-05?09:32??網絡聊天程序\Chat\USERDB\
?????文件?????????710??2018-03-25?19:44??網絡聊天程序\Chat\USERDB\README_DO_NOT_TOUCH_FILES.txt
?????文件??????????38??2018-07-05?09:32??網絡聊天程序\Chat\USERDB\db.lck
?????目錄???????????0??2018-07-05?09:28??網絡聊天程序\Chat\USERDB\log\
?????文件?????????532??2018-03-25?19:44??網絡聊天程序\Chat\USERDB\log\README_DO_NOT_TOUCH_FILES.txt
?????文件??????????48??2018-07-05?09:32??網絡聊天程序\Chat\USERDB\log\log.ctrl
?????文件?????1048576??2018-04-08?23:19??網絡聊天程序\Chat\USERDB\log\log1.dat
?????文件??????????48??2018-07-05?09:32??網絡聊天程序\Chat\USERDB\log\logmirror.ctrl
?????目錄???????????0??2018-07-05?09:28??網絡聊天程序\Chat\USERDB\seg0\
?????文件?????????533??2018-03-25?19:44??網絡聊天程序\Chat\USERDB\seg0\README_DO_NOT_TOUCH_FILES.txt
?????文件????????8192??2018-03-25?19:44??網絡聊天程序\Chat\USERDB\seg0\c10.dat
?????文件????????8192??2018-03-25?22:03??網絡聊天程序\Chat\USERDB\seg0\c101.dat
?????文件????????8192??2018-03-25?22:03??網絡聊天程序\Chat\USERDB\seg0\c111.dat
?????文件????????8192??2018-03-25?22:03??網絡聊天程序\Chat\USERDB\seg0\c121.dat
?????文件????????8192??2018-03-25?22:03??網絡聊天程序\Chat\USERDB\seg0\c130.dat
?????文件????????8192??2018-03-25?22:03??網絡聊天程序\Chat\USERDB\seg0\c141.dat
?????文件????????8192??2018-03-25?19:44??網絡聊天程序\Chat\USERDB\seg0\c150.dat
?????文件????????8192??2018-03-25?19:44??網絡聊天程序\Chat\USERDB\seg0\c161.dat
?????文件????????8192??2018-03-25?19:44??網絡聊天程序\Chat\USERDB\seg0\c171.dat
?????文件???????36864??2018-03-25?19:44??網絡聊天程序\Chat\USERDB\seg0\c180.dat
?????文件???????16384??2018-03-25?19:44??網絡聊天程序\Chat\USERDB\seg0\c191.dat
?????文件???????16384??2018-03-25?19:44??網絡聊天程序\Chat\USERDB\seg0\c1a1.dat
?????文件???????16384??2018-03-25?19:44??網絡聊天程序\Chat\USERDB\seg0\c1b1.dat
?????文件????????8192??2018-03-25?19:44??網絡聊天程序\Chat\USERDB\seg0\c1c0.dat
............此處省略118個文件信息
評論
共有 條評論