java 客户端代码代码

时间:2011-09-27 15:53:47
【文件属性】:

文件名称:java 客户端代码代码

文件大小:1KB

文件格式:JAVA

更新时间:2011-09-27 15:53:47

代码

public class ChatSocket { private ChatJFrame chatframe; private Socket client; public ChatSocket(String host,int port,String name) { try { client=new Socket(host,port); BufferedReader cin=new BufferedReader(new InputStreamReader(client.getInputStream())); PrintWriter cout=new PrintWriter(client.getOutputStream(),true); chatframe=new ChatJFrame(name,"客户端 主机"+host+" 端口"+port,cout);


网友评论