import java.net.*;
import java.io.*;
public class ClientTest
{
public static void main(String[] args)
{
String s=null; //保存输入字符串
try
{
InetAddress addr=InetAddress.getByName("localhost");
System.out.println("addr="+addr);
Socket socket=new Socket(addr,2345); //连接服务器
System.out.println("客户端请求连接..... 连接成功!");
try
{
//获得当前连接的数据流