import java.net.*;
import java.io.*;
class ServerDemo
{
public static void main(String[] args) throws Exception
{
ServerSocket ss = new ServerSocket(11111);
Socket s =ss.accept();
String ip = s.getInetAddress().getHostAddress();
System.out.println(ip+">>>已连接");
PrintWriter out = new PrintWriter(s.getOutputStream(),true);
out.println("自定义浏览器");
out.println("自定义浏览器");
out.println("自定义浏览器");
out.println("自定义浏览器");
//s.close();
//ss.close();
}
}
代码是这样,可用浏览器怎么就 怎么也连不上呢???
我确定服务端开了,用dos的telnet 命令可用返回数据。可用IE怎么也老连接不上呀?谁有类似经历?
求指教???
|
|