Search in sources :

Example 1 with WSConfig

use of com.benmu.framework.adapter.ws.WSConfig in project WeexErosFramework by bmfe.

the class DebuggerWebSocket method connect.

private void connect(String url) {
    // connect when interceptor close
    if (!Constant.INTERCEPTOR_ACTIVE.equals(SharePreferenceUtil.getInterceptorActive(BMWXEnvironment.mApplicationContext))) {
        Log.e(TAG, "connecting");
        mActice = true;
        // create new instance when webSocketInstance has connected
        if (webSocketInstance.isConnected()) {
            webSocketInstance = new DefaultWebSocketAdapter();
        }
        webSocketInstance.connect(url, "", eventListent, new WSConfig(true, 10));
        webSocketInstance.setConnected(true);
    } else {
        close();
        mActice = false;
    }
}
Also used : WSConfig(com.benmu.framework.adapter.ws.WSConfig) DefaultWebSocketAdapter(com.benmu.framework.adapter.ws.DefaultWebSocketAdapter)

Aggregations

DefaultWebSocketAdapter (com.benmu.framework.adapter.ws.DefaultWebSocketAdapter)1 WSConfig (com.benmu.framework.adapter.ws.WSConfig)1