freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于java實(shí)現(xiàn)聊天室范文畢業(yè)論文(參考版)

2025-06-01 22:34本頁面
  

【正文】 //reference to the method exit() in ChatRoomClient. }}。 public ChatFrame_WindowAdapter(ChatRoomClient chatFrame){ =chatFrame。 if(j==){ ()。public textField2_KeyAdapter(ChatRoomClient chatFrame){ =chatFrame。 if(j==){ ()。public textField1_KeyAdapter(ChatRoomClient chatFrame){ =chatFrame。 }catch(IOException ioe){} finally{ (0)。 ()。 }catch(Exception exc){} //endConnect()。 }catch(IOException ioe){} }public void exit(){//窗口關(guān)閉;如果有連接則關(guān)閉連接和相關(guān)的流 try{//send Client exit! to Server! (Client exit!)。 ()。 } } //endConnect()。 }catch(IOException e){ processMsg(())。//終止線程 }else if(msg!=null){ processMsg(msg)。 if((Server exit!)){//Server exit processMsg(msg)。 isTrue=true。 (\n)。 }public void stopRun(){//to stop the running thread isTrue=false。}private void button1_actionPerformed(ActionEvent e){//連接按鈕 startConnect()。 }//public void endConnect(){//close IOstream public void sendInformation(){ (())。 }readThread=new Thread(this)。 }catch(IOException ex){ processMsg(())。 } in=new BufferedReader(new InputStreamReader(()))。 //()} public void startConnect(){//開始連接 try{ sock=new Socket((),DEFAULT_PORT)。 (sPanel,)。 (500,400)。//frame (new ChatFrame_WindowAdapter(this))。 (textField2)。be registered to KeyListener. //press key:Enter to send message (new textField2_KeyAdapter(this))。 } })。//sPanel ScrollPane (textArea)。//() (button1)。 //textField1:for input the address of Server。//panel1 //press button1: 連接 to connect the Client to Server (new (){ public void actionPerformed(ActionEvent e){ button1_actionPerformed(e)。 sPanel=new ScrollPane()。 panel1=new Panel()。 textField2=new TextField(input Message here and send to Server)。// set Font button2=new Button(發(fā)送)。 ()。 }catch(Exception e){ ()。 boolean isTrue=true。 public final static int DEFAULT_PORT=6666。 BufferedReader in=null。 ScrollPane sPanel。 Label label1。 Button button1,button2。import .*。import .*。 } public void windowClosing(WindowEvent e){//exit program ()。//version2 }catch(InterruptedException ex){} } }catch(Exception e){} }}//處理窗口關(guān)閉事件的適配器class ChatFrame_WindowAdapter extends { ChatRoomServer chatFrame。 } //clear the inforStack ()。 broadcastInfor=ClientName++string。j()。//得到每個(gè)連接的信息棧 ClientName=(String)(i)。i++){ Thread1=(CommunicateThread)(i)。 } }public void run(){ try{ while(true){ for(int i=0。k++){//send to everyone 分別調(diào)用每個(gè)連接線程,發(fā)送信息 Thread2=(CommunicateThread)(k)。 } public void broadcast(String str){//廣播 for(int k=0。 ClientMsg=。public BroadcastThread(ChatRoomServer cFrame){ chatFrame2=cFrame。//Client thread name String broadcastInfor。 String string。//記錄客戶發(fā)送的信息 CommunicateThread Thread1。//連接線程信息 msgStack。} }}class BroadcastThread extends Thread{//廣播線程 ChatRoomServer chatFrame2。 ()。 }private void stopRun(){//終止線程 isTrue=false。// }catch(IOException ei){。 (index2)。 ()。//version2 }catch(InterruptedException ex){} } }catch(IOException e){ 。 }//else break。//把信息寫到信息棧,以倍廣播出去 stopRun()。 try{ while(isTrue){ infor=()。 } ()。 }catch(IOException ei2){ } (())。 out=new PrintWriter(())。 inforStack=new ()。 chatFrame=cFrame。 int index2。 boolean isTrue=true。 protected PrintWriter out。 }}class CommunicateThread extends Thread{//保持連接線程 protected Socket ClientSock。 }catch(IOException ioe){} finally{ (0)。 } }public void exit(){ (Server exit!)。 processMsg(Thread+i+join in\n)。 index++。//record Communicate Thread。 CommunicateThread ct=new CommunicateThread(ClientSock,this,index)。//還有一個(gè)回收無用連接 thread 的線程 }public void run(){//接受連接并記錄線程信息 int i=0。broadcastThread=new BroadcastThread(this)。 chatAcceptThread=new Thread(this)。 Clients=new ()。 processMsg(Server failed!\n)。 }private void ServerListen(){ try{ ServerSock=new ServerSocket(DEFAULT_PORT)。}private void button1_actionPerformed(ActionEvent e){ exit()。 (panel,)。 (new BorderLayout())。(new ChatFrame_WindowAdapter(this))。} })。(textArea)。 textArea=new TextArea(Server information:\n)。//服務(wù)器開始監(jiān)聽 } private void jbInit(){//初始化界面 panel=new Panel()。 }catch(Exception e){ ()。//記錄連接線程的信息 public static int index=0。 run when Server is listening Clients。//啟動(dòng)接受連接的線程 BroadcastThread broadcastThread。 public final static int DEFAULT_PORT=6666。 Button button1。 ScrollPane sPanel。import .*。import .*。同時(shí),還要感謝我的同學(xué)和朋友,在我畢業(yè)設(shè)計(jì)的過程中,他們給了我很多無私的幫助和支持,使我得到了許多有益的啟發(fā)。他淵博的學(xué)識(shí)、縝密的邏輯、敏銳的思維、高尚的師德讓我肅然起敬,這些優(yōu)秀的品質(zhì)將在以后的生活中一直伴隨和激勵(lì)著我。這次畢業(yè)設(shè)計(jì)能夠按時(shí)、按要求完成,與吳老師的指導(dǎo)與幫助分不開。參考文獻(xiàn)[1] TCP/IP 應(yīng)用開發(fā)詳解[M].北京:電子工業(yè)出版社,2022[2] 應(yīng)用開發(fā)詳解[M].北京:電子工業(yè)出版社,2022[3][M].北京:清 華大學(xué)出版社, 1992[4]朱三元,錢樂秋,[M]. 北京:科學(xué)出版社,2022[5][M]. 北京:科學(xué)出版社, 1992[6] 語言程序設(shè)計(jì)[M].北京:清華大學(xué)出版社,2022[7]耿祥義, 實(shí)用教程[M].北京:清華大學(xué)出版社,2022[8]徐家福,[M].北京:科學(xué)出版社,2022[9]尉哲明, 技術(shù)教程[M].北京:清華大學(xué)出版社,2022[10] 語言程序設(shè)計(jì)[M].北京:高等教育出版社,2022[11]Douglas Kramer,The JavaPlatformA White Paper[J].Silicm Valley:Sun Marosystem Press,1996,02(9):56[12] Harvey ,Paul (原書第 3 版)[M].北京:機(jī)械工業(yè)出版社,2022[13]James Gosling,Bill Joy, WhileAccept loop (Server side) [J].Valley:Sun Microsystem Press,2022,18(3):1617[14]Patrick Chan,Rosanna Lee,Douglas Kramer,Java2 類庫(增補(bǔ)版)[M].北京:機(jī)械工業(yè)出版社,2022[15]Sun Microsystems, Programming [J] Valley:Student Guide,2022,04(7):1214致 謝 首先感謝我的導(dǎo)師***老師對我的悉心幫助和關(guān)懷。由于設(shè)計(jì)時(shí)間較短,系統(tǒng)開發(fā)經(jīng)驗(yàn)不足,所以該系統(tǒng)還有許多不盡如人意的地方。經(jīng)過三個(gè)月的設(shè)計(jì)和開發(fā),基于 C/S 的 Java 聊天室系統(tǒng)基本開發(fā)完畢。在界面設(shè)計(jì)中,也存在界面設(shè)計(jì)不夠完美,不夠人性化,功能不夠詳盡等問題。因?yàn)閷?Java Socket 技術(shù)掌握的不夠充分,在系統(tǒng)設(shè)計(jì)中,有些功能未能實(shí)現(xiàn),如實(shí)現(xiàn)用戶列表等。課題中,完成了對用戶和系統(tǒng)流程的需求分析的調(diào)查,系統(tǒng)的分析和設(shè)計(jì),增強(qiáng)了 Java 網(wǎng)絡(luò)編程的實(shí)際鍛煉。在分析、研究聊天室技術(shù)的基礎(chǔ)上,對系統(tǒng)的組織結(jié)構(gòu)、數(shù)據(jù)流程、用戶需求等內(nèi)容進(jìn)行了詳細(xì)的調(diào)查和分
點(diǎn)擊復(fù)制文檔內(nèi)容
規(guī)章制度相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1