Lines Matching refs:attempt
354 // Returns < 0 on error, 0 on successfully started connection attempt,
356 static int start_connect_attempt(struct ConnectionAttempt *attempt,
366 attempt->fd = ff_socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol, h);
367 if (attempt->fd < 0)
369 attempt->deadline_us = av_gettime_relative() + timeout_ms * 1000;
370 attempt->addr = ai;
372 ff_socket_nonblock(attempt->fd, 1);
375 customize_fd(customize_ctx, attempt->fd);
377 while ((ret = connect(attempt->fd, ai->ai_addr, ai->ai_addrlen))) {
382 closesocket(attempt->fd);
383 attempt->fd = -1;
391 closesocket(attempt->fd);
392 attempt->fd = -1;
400 // RFC 8305 (or sooner if an earlier attempt fails).
426 // Start a new connection attempt, if possible.
431 av_log(h, AV_LOG_VERBOSE, "Starting connection attempt to %s port %s\n",
438 av_log(h, AV_LOG_VERBOSE, "Connected attempt failed: %s\n",
458 // If we can start another attempt in parallel, wait until that time.
498 // it from the attempts/pfd arrays, to let a new attempt start
504 av_log(h, AV_LOG_VERBOSE, "Connection attempt to %s port %s "