Advertisement
sebp

Main.java

Jan 4th, 2012
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. import essai.CometClient;
  2.  
  3. public class Main {
  4.  
  5.     private static CometClient cometClient;
  6.    
  7.     public static void main(String[] args) {
  8.         // Replace IP:PORT with valid values before use:
  9.         cometClient = new CometClient("http://xxx.xxx.xxx.xxx:xxxx");
  10.         if( cometClient.handshake() && cometClient.connect() ) {
  11.             while( true ) {
  12.                 try {
  13.                     System.out.println("Main thread: sleeping 10 seconds...");
  14.                     Thread.sleep(10000);
  15.                 } catch (InterruptedException e) {
  16.                     // TODO Auto-generated catch block
  17.                     e.printStackTrace();
  18.                 }
  19.             }
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement