1 Socket socket = new Socket(host, port); 2 PrintWriter sout = new PrintWriter(socket.getOutputStream(),true); 3 4 BufferedReader sin = new BufferedReader( 5 new InputStreamReader( 6 socket.getInputStream())); 7 8 9 InputStreamReader sin = new InputStreamReader(socket.getInputStream());
10 // I read the firts line produced by the // remote machine 11 String line = sin.readLine(); 12 line = sin.readLine(); 13 14 15 // I put login and password to the remote machine 16 sout.println(login); 17 sout.println(passwd); 18 19 line = sin.readLine(); 20 21 // I put the command to the remote machine 22 sout.println("hssdp:snb=158" + nro_telf + ",list;");
When I execute this code in Windows 2000 everything works fine. When I excute this code in UNIX (Solaris) everything works fine until line 19. When the program reach line 19, it stays hold and do nothing else. What could be the problem ????