Description: A Java chat server and client service procedures, C/S structure, ChatServer class implements a chat room on the server side, such a constructor, use newServerSocket in the constructor () to create a Socket connection. RunServer () method to run the chat service, (). GetHostName () method to get the host name through the Socket class getInetAddress, establish new ChatHandler object instance, to synchronize with the client synchronized (clients) in. ChatHandler inner class inherits the Thread class, in this thread run () method of processing a conversation. Close () method closes the connection with the client.
ChatRoom class extends Applet, () to create a chat window by new Frame init () in, and set the form layout in this form. In the login () method to establish a connection with the server via new Socket (serverHost, port), produced by the new chat thread new Thread (). In the logout () method, using sock.close () closes the connection.
To Search:
File list (Check if you may need any files):
editor\asp\file_manager_json.asp
......\...\JSON_2.0.4.asp
......\...\UpLoad_Class.asp
......\...\upload_json.asp
......\kindeditor.js
......\lang\ar.js
......\....\en.js
......\....\ko.js
......\....\zh_CN.js
......\....\zh_TW.js
......\plugins\anchor\anchor.js
......\.......\.utoheight\autoheight.js
......\.......\baidumap\baidumap.js
......\.......\........\index.html
......\.......\........\map.html
......\.......\clearhtml\clearhtml.js
......\.......\.ode\code.js
......\.......\....\prettify.css
......\.......\....\prettify.js
......\.......\emoticons\emoticons.js
......\.......\.........\images\0.gif
......\.......\.........\......\1.gif
......\.......\.........\......\10.gif
......\.......\.........\......\100.gif
......\.......\.........\......\101.gif
......\.......\.........\......\102.gif
......\.......\.........\......\103.gif
......\.......\.........\......\104.gif
......\.......\.........\......\105.gif
......\.......\.........\......\106.gif
......\.......\.........\......\107.gif
......\.......\.........\......\108.gif
......\.......\.........\......\109.gif
......\.......\.........\......\11.gif
......\.......\.........\......\110.gif
......\.......\.........\......\111.gif
......\.......\.........\......\112.gif
......\.......\.........\......\113.gif
......\.......\.........\......\114.gif
......\.......\.........\......\115.gif
......\.......\.........\......\116.gif
......\.......\.........\......\117.gif
......\.......\.........\......\118.gif
......\.......\.........\......\119.gif
......\.......\.........\......\12.gif
......\.......\.........\......\120.gif
......\.......\.........\......\121.gif
......\.......\.........\......\122.gif
......\.......\.........\......\123.gif
......\.......\.........\......\124.gif
......\.......\.........\......\125.gif
......\.......\.........\......\126.gif
......\.......\.........\......\127.gif
......\.......\.........\......\128.gif
......\.......\.........\......\129.gif
......\.......\.........\......\13.gif
......\.......\.........\......\130.gif
......\.......\.........\......\131.gif
......\.......\.........\......\132.gif
......\.......\.........\......\133.gif
......\.......\.........\......\134.gif
......\.......\.........\......\14.gif
......\.......\.........\......\15.gif
......\.......\.........\......\16.gif
......\.......\.........\......\17.gif
......\.......\.........\......\18.gif
......\.......\.........\......\19.gif
......\.......\.........\......\2.gif
......\.......\.........\......\20.gif
......\.......\.........\......\21.gif
......\.......\.........\......\22.gif
......\.......\.........\......\23.gif
......\.......\.........\......\24.gif
......\.......\.........\......\25.gif
......\.......\.........\......\26.gif
......\.......\.........\......\27.gif
......\.......\.........\......\28.gif
......\.......\.........\......\29.gif
......\.......\.........\......\3.gif
......\.......\.........\......\30.gif
......\.......\.........\......\31.gif
......\.......\.........\......\32.gif
......\.......\.........\......\33.gif
......\.......\.........\......\34.gif
......\.......\.........\......\35.gif
......\.......\.........\......\36.gif
......\.......\.........\......\37.gif
......\.......\.........\......\38.gif
......\.......\.........\......\39.gif
......\.......\.........\......\4.gif
......\.......\.........\......\40.gif
......\.......\.........\......\41.gif
......\.......\.........\......\42.gif
......\.......\.........\......\43.gif
......\.......\.........\......\44.gif
......\.......\.........\......\45.gif
......\.......\.........\......\46.gif
......\.......\.........\......\47.gif
......\.......\.........\......\48.gif
......\.......\.........\......\49.gif