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

正文內(nèi)容

socket和多線程編程的聊天程序?qū)崿F(xiàn)-wenkub.com

2025-07-04 12:10 本頁面
   

【正文】 不奮斗就是每天都很容易,可一年一年越來越難。同時也提高了團隊協(xié)作的能力,但是建議以后組內(nèi)成員最好分工明確,而不要過多依賴,真正參與進去才能學(xué)到東西??傊?,這要靠不斷實踐來提高。在該課題中,很容易就分成三個類,Server類、Client類和Face類,這樣分工明確,幾個類可以單獨寫。(3)界面美化方面比較欠缺,可以更加友好和美觀。 但是我想通過程序自動獲取加進來的IP地址,可以調(diào)用public byte[] getAddress()方法,但是沒能成功,相互的連接也不是很順暢,留待下次解決。應(yīng)用程序通常通過它向網(wǎng)絡(luò)發(fā)出或應(yīng)答請求。 } else (())。 public static void main(String[] args) { } (0)。 public void actionPerformed(ActionEvent e) { (new ActionListener() { //設(shè)置窗體大小//窗口顯示再屏幕的位置坐標setLocation(400, 250)。 //向容器中加入以上組件 (false)。 (new TFListener())。 tftype = new TextField(40)。 lbl3 = new Label(發(fā)送內(nèi)容:)。 tfport = new TextField(8080)。 lbl2 = new Label(端口:)。 tfaddress = new TextField(, 10)。 lbl1 = new Label(IP地址:)。 ta = new TextArea(, 10, 50, )。 serverBtn = new Button(服務(wù)器)。 clientBtn = new Button(客戶端)。 主要處理了鍵盤Enter消息接受,下面是實現(xiàn)代碼:package 。 } } catch (IOException err) { ()。 while (true) { theOutputStream = new PrintStream(())。 theInputStream = new BufferedReader(new InputStreamReader(()))。 public void run() { // 獲取端口號 // 獲取IP地址 host = (ip)。 // 主機地址 InetAddress host。import 。調(diào)用public InputStream getInputStream()和public OutputStream getOutputStream()方法,分別得到Socket對象的輸入輸出流。 } (())。 try { (true)。 (true)。 (true)。 (true)。 } (readin + \n)。 readin = ()。 public Socket getClient() { public ServerThread(Socket s, Face chat, int i) { Face chat。 String readin。 PrintStream theOutputStream。 BufferedReader theInputStream。 int port,i。 TextArea in。 Socket Client。 ServerSocket skt。 //for(int j=0。 } (())。} else { k++。 i = server[k].getI()。 theOutputStream = new PrintStream(server[k].getClient().getOutputStream())。j。 (“客戶端“+ Client[k].getInetAddress() + 已連線\n)。 server[k].start()。ServerThread server[] = new ServerThread[10]。 //當有客戶端連接時就新建一個子線程 try { } (())。
點擊復(fù)制文檔內(nèi)容
外語相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1