【正文】
ign and interface, logical structure. Ultimately can achieve a whisper, group chat, send files online chat system. This design mostly Socket work munication as the basis, and with Object as the munication carrier, while the use of a certain protocol to plete the knowledge development. In the interface, the use of the Java in the Swing technologies. To achieve multiuser connection, the server will use the technology to implement multithreading.Keywords:Java Socket Communication protocol Swing Multithreading目錄 ..........................................................................................................................4 課題背景 ..............................................................................................................4 課題研究內(nèi)容及意義 ..........................................................................................4 系統(tǒng)相關(guān)技術(shù)介紹 ..............................................................................................5 Java 語言概述 ...............................................................................................5 TCP/IP 協(xié)議 ...................................................................................................7 Socket 編程 ....................................................................................................9 Swing 簡介 ...................................................................................................11 多線程技術(shù)介紹 .........................................................................................12 ........................................................................................................15 需求分析 ............................................................................................................15 可行性分析 ........................................................................................................16 社會(huì)可行性 .................................................................................................16 用戶可行性 .................................................................................................16 技術(shù)可行性 .................................................................................................16 經(jīng)濟(jì)可行性 .................................................................................................17 系統(tǒng)開發(fā)環(huán)境 ....................................................................................................17 ........................................................................................................18 客戶端與服務(wù)器的通信 ....................................................................................18 客戶端與客戶端的通信 ....................................................................................18 系統(tǒng)的架構(gòu)模式 ................................................................................................19四. 系統(tǒng)功能模塊設(shè)計(jì) ..............................................................................................20 服務(wù)器端的設(shè)計(jì) ................................................................................................20 服務(wù)器等待連接線程設(shè)計(jì) .........................................................................20 服務(wù)器處理客戶端信息線程設(shè)計(jì) .............................................................21 客戶端設(shè)計(jì) ........................................................................................................27 客戶端登錄模塊設(shè)計(jì) .................................................................................27 新用戶注冊模塊設(shè)計(jì) .................................................................................28 客戶端主界面模塊設(shè)計(jì) .............................................................................28 點(diǎn)對點(diǎn)通信模塊設(shè)計(jì) .................................................................................29 一對多通信模塊設(shè)計(jì) .................................................................................29 點(diǎn)對點(diǎn)文件傳輸模塊設(shè)計(jì) .........................................................................30五. 系統(tǒng)測試 ..............................................................................................................32 ....................................................................................................................32 ................................................................................................................33 課題背景Inter 是目前世界上最大的計(jì)算機(jī)互聯(lián)網(wǎng)絡(luò),它遍布全球,并將世界各地不同規(guī)模和大小的網(wǎng)絡(luò)連接成為一個(gè)整體。本次設(shè)計(jì)主要以 Socket 網(wǎng)絡(luò)通訊作為基礎(chǔ),并以 Object作為通訊載體,同時(shí)運(yùn)用了一定的通訊協(xié)議知識(shí)開發(fā)完成。人們希望能夠用更低廉的價(jià)格,更加方便快捷的方式,來實(shí)現(xiàn)即時(shí)通訊。這時(shí)過去的種種陳舊的通訊方式,都已經(jīng)不能滿足現(xiàn)代生活的需要。最終實(shí)現(xiàn)了一個(gè)可以實(shí)現(xiàn)私聊、群聊、傳送文件的網(wǎng)絡(luò)聊天系統(tǒng)。關(guān)鍵詞:Java Socket 通訊協(xié)議 Swing 多線程 Socketbased web chat system development and designAbstractRecent years, with the rapid development of puter technology, especially Inter technology, has profound change to all aspects of people39。目前人們進(jìn)行信息交流的方式非常多,例如電報(bào)、電話、電子郵件等通訊