io.ably.lib.network.DefaultWebSocketEngine Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of network-client-default Show documentation
Show all versions of network-client-default Show documentation
Default implementation for HTTP client
package io.ably.lib.network;
import java.net.URI;
public class DefaultWebSocketEngine implements WebSocketEngine {
private final WebSocketEngineConfig config;
public DefaultWebSocketEngine(WebSocketEngineConfig config) {
this.config = config;
}
@Override
public WebSocketClient create(String url, WebSocketListener listener) {
DefaultWebSocketClient client = new DefaultWebSocketClient(URI.create(url), listener, config);
if (config.isTls()) {
client.setSocketFactory(config.getSslSocketFactory());
}
return client;
}
@Override
public boolean isPingListenerSupported() {
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy