Advertisement
kaitoso

lol

Sep 21st, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. package servidor2;
  2.  
  3. import java.io.*;
  4. import java.io.DataOutputStream;
  5. import java.net.*;
  6.  
  7. /**
  8. *
  9. * @author carlos
  10. */
  11. public class conecta3 {
  12.  
  13. String ip="192.168.0.103";
  14. int puerto2=5000;
  15. Socket cliente;
  16. DataOutputStream salida2;
  17. DataInputStream entrada;
  18. String mensaje;
  19.  
  20. public void inicia2(){
  21.  
  22. try{
  23.  
  24. cliente=new Socket(ip,puerto2);
  25. salida2=new DataOutputStream(cliente.getOutputStream());
  26. entrada = new DataInputStream(cliente.getInputStream());
  27.  
  28. for(int i=125;i<500;i++){
  29. salida2.writeUTF(String.valueOf(conecta2.arre1[i]));
  30.  
  31. System.out.println(conecta2.arre1[i]);
  32. }
  33. System.out.println("hola mundo");
  34. System.out.println(conecta2.arre1[499]);
  35.  
  36. System.out.println(entrada.readUTF());
  37.  
  38. }catch(Exception e){
  39.  
  40. System.out.println(e.getMessage());
  41.  
  42. }
  43. }
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement