you have just to create a new class that implements WebSocketCallback
like this :

        class tt implements WebSocketCallback {

                @Override
                public void connected() {
                        // TODO Auto-generated method stub

                }

                @Override
                public void disconnected() {
                        // TODO Auto-generated method stub

                }

                @Override
                public void message(String message) {
                        // if your server reply to HELLO sent
                        // response is here
                        System.out.println(message);

                }

                @Override
                public void error(String message) {
                        // TODO Auto-generated method stub

                }

                @Override
                public void info(String message) {
                        // TODO Auto-generated method stub
                }

then a method in another class


        public void zz() {
                WebSocketClient client = new WebSocketClient(new tt());
                client.connect("ws://your_server_ip_or_address");
                client.send("HELLO");
        }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to