Advertisement
Guest User

Do something

a guest
Aug 18th, 2014
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1.     private static Runnable streamThread = new Runnable()
  2.     {
  3.         public void run()
  4.         {
  5.             threadAktiv = true;
  6.             while(true)
  7.             {
  8.                 if(connectionClassList.size() == 0)
  9.                 {
  10.                     return;
  11.                 }
  12.                 for(int i = 0; i < connectionClassList.size(); i++)
  13.                 {
  14.                     try
  15.                     {
  16.                         Socket connection = connectionClassList.get(i).getSocket();
  17.  
  18.                         ObjectOutputStream output = connectionClassList.get(i).getOutput();
  19.                         ObjectInputStream input = connectionClassList.get(i).getInput();
  20.                            
  21.                         output.writeObject("Hello there!");
  22.                     }
  23.                     catch (IOException e)
  24.                     {}
  25.                 }
  26.             }
  27.         }
  28.     };
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement