Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import essai.CometClient;
- public class Main {
- private static CometClient cometClient;
- public static void main(String[] args) {
- // Replace IP:PORT with valid values before use:
- cometClient = new CometClient("http://xxx.xxx.xxx.xxx:xxxx");
- if( cometClient.handshake() && cometClient.connect() ) {
- while( true ) {
- try {
- System.out.println("Main thread: sleeping 10 seconds...");
- Thread.sleep(10000);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement