随笔 - 1, 文章 - 2, 评论 - 0, 引用 - 0
数据加载中……

Java Socket 客户端示例代码

客户端代码
Socket socket = new Socket("127.0.0.1",9999);
OutputStreamWriter osWriter = new OutputStreamWriter(socket.getOutputStream());
BufferedWriter writer = new BufferedWriter(osWriter);
double b = Math.random()*10000;
writer.write("发动内容" + b);
writer.close();
socket.close();

posted on 2010-10-15 08:52 温凯旋 阅读(91) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: