java客户端的接收函数的代码:try{
          in = new BufferedReader(new InputStreamReader(client.getInputStream()));
          System.out.println(in.readLine());
            } catch(IOException ex){
             ex.printStackTrace();
           }
用in.readLine只能接收单片机服务端返回过来的一行数据,服务端是用C写的,返回数据有多行,如果把代码加上循环:try{
          in = new BufferedReader(new InputStreamReader(client.getInputStream()));
          String ss=null;
          while((ss=in.readLine())!=null){
          System.out.println(ss);
          }
          //System.out.println(in.readLine());
            } catch(IOException ex){
             ex.printStackTrace();
           }
结果只能连接一次,再连接服务端就连接不上了,提示:连接拒绝
问:这种情况是什么原因造成的,怎么解决?