Lines Matching refs:sock
150 static int connect_with_timeout(int sock, const struct sockaddr *nsap,
152 static int retrying_poll(const int sock, short events, const struct timespec* finish);
980 connect_with_timeout(int sock, const struct sockaddr *nsap, socklen_t salen, in connect_with_timeout() argument
985 origflags = fcntl(sock, F_GETFL, 0); in connect_with_timeout()
986 fcntl(sock, F_SETFL, origflags | O_NONBLOCK); in connect_with_timeout()
988 res = __connect(sock, nsap, salen); in connect_with_timeout()
997 async_safe_format_log(ANDROID_LOG_DEBUG, "libc", " %d send_vc\n", sock); in connect_with_timeout()
1000 res = retrying_poll(sock, POLLIN | POLLOUT, &finish); in connect_with_timeout()
1006 fcntl(sock, F_SETFL, origflags); in connect_with_timeout()
1009 " %d connect_with_const timeout returning %d\n", sock, res); in connect_with_timeout()
1015 retrying_poll(const int sock, const short events, const struct timespec* finish) { in retrying_poll() argument
1020 async_safe_format_log(ANDROID_LOG_DEBUG, "libc", " %d retrying_poll\n", sock); in retrying_poll()
1028 struct pollfd fds = { .fd = sock, .events = events }; in retrying_poll()
1033 " %d retrying_poll timeout\n", sock); in retrying_poll()
1043 " %d retrying_poll got error %d\n",sock, n); in retrying_poll()
1050 if (getsockopt(sock, SOL_SOCKET, SO_ERROR, &error, &len) < 0 || error) { in retrying_poll()
1054 " %d retrying_poll dot error2 %d\n", sock, errno); in retrying_poll()
1062 " %d retrying_poll returning %d\n",sock, n); in retrying_poll()