package tcpc;
import java.io.DataInputStream;
import java.io.IOException;import java.net.Socket;
//caoliu
public class CL { public static void main(String[] args) throws IOException {
System.out.println("start");
boolean s = true;
System.out.println("在听");
//创建socket对象
Socket client = new Socket("192.18.23.2",36666); while (s) {
//获取输入流
DataInputStream is = new DataInputStream(client.getInputStream());
System.out.println(is.readUTF()); //关闭
if(is!=null) {
is.close();
s = false;
}
if(client!=null) {
client.close();
s = false;
}
}
}
}