Lines Matching refs:attempt
356 static int start_connect_attempt(struct ConnectionAttempt *attempt, in start_connect_attempt() argument
366 attempt->fd = ff_socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol, h); in start_connect_attempt()
367 if (attempt->fd < 0) in start_connect_attempt()
369 attempt->deadline_us = av_gettime_relative() + timeout_ms * 1000; in start_connect_attempt()
370 attempt->addr = ai; in start_connect_attempt()
372 ff_socket_nonblock(attempt->fd, 1); in start_connect_attempt()
375 customize_fd(customize_ctx, attempt->fd); in start_connect_attempt()
377 while ((ret = connect(attempt->fd, ai->ai_addr, ai->ai_addrlen))) { in start_connect_attempt()
382 closesocket(attempt->fd); in start_connect_attempt()
383 attempt->fd = -1; in start_connect_attempt()
391 closesocket(attempt->fd); in start_connect_attempt()
392 attempt->fd = -1; in start_connect_attempt()