Example usage for com.google.gwt.websocket.client WebSocketImpl open

List of usage examples for com.google.gwt.websocket.client WebSocketImpl open

Introduction

In this page you can find the example usage for com.google.gwt.websocket.client WebSocketImpl open.

Prototype

public static WebSocketImpl open(String url) 

Source Link

Usage

From source file:org.rest.client.activity.SocketActivity.java

License:Apache License

@Override
public void connect(String url) {
    if (socket != null) {
        socket.close();//from ww  w .  ja v  a 2  s  . c om
    }
    socket = null;
    socketUrl = url;
    messages.clear();
    saveHistory();
    view.setConnectionStatus(WebSocket.CONNECTING);

    socket = WebSocketImpl.open(url);
    setUpSocketHandlers();

}