MCPcopy Index your code
hub / github.com/ccxt/ccxt / connect

Method connect

java/lib/src/main/java/io/github/ccxt/ws/WsClient.java:250–261  ·  view source on GitHub ↗

Connect to the WebSocket server. Returns a future that completes when connected. If already connecting/connected, returns the existing future.

(int backoffDelay)

Source from the content-addressed store, hash-verified

248 * If already connecting/connected, returns the existing future.
249 */
250 public CompletableFuture<Boolean> connect(int backoffDelay) {
251 if (this.startedConnecting.compareAndSet(false, true)) {
252 if (backoffDelay > 0) {
253 CompletableFuture.delayedExecutor(backoffDelay,
254 java.util.concurrent.TimeUnit.MILLISECONDS)
255 .execute(this::createConnection);
256 } else {
257 Exchange.VIRTUAL_EXECUTOR.execute(this::createConnection);
258 }
259 }
260 return this.connected;
261 }
262
263 private void createConnection() {
264 try {

Calls

no outgoing calls