socket = new Socket(address, port);
out = socket.getOutputStream();
pw = new PrintWriter(out);  
is = socket.getInputStream();  
    pw.write(message);
    pw.flush();
socket.shutdownOutput();  
        //接收服务器的相应  
System.out.println("send message:" + message);
int count = 0;  
         while (count == 0) {  
             count = is.available();  
         }  
         byte[] b = new byte[count];  
         is.read(b);
         reply = new String(b);上面是代码,直接运行是发不出信息的,也接收不到。调试的时候如果直接一步跳过也收不到 ,只有单步一步一步走才能发出去并受到信息