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);
981 connect_with_timeout(int sock, const struct sockaddr *nsap, socklen_t salen, in connect_with_timeout() argument
986 origflags = fcntl(sock, F_GETFL, 0); in connect_with_timeout()
987 fcntl(sock, F_SETFL, origflags | O_NONBLOCK); in connect_with_timeout()
989 res = __connect(sock, nsap, salen); in connect_with_timeout()
998 async_safe_format_log(ANDROID_LOG_DEBUG, "libc", " %d send_vc\n", sock); in connect_with_timeout()
1001 res = retrying_poll(sock, POLLIN | POLLOUT, &finish); in connect_with_timeout()
1007 fcntl(sock, F_SETFL, origflags); in connect_with_timeout()
1010 " %d connect_with_const timeout returning %d\n", sock, res); in connect_with_timeout()
1016 retrying_poll(const int sock, const short events, const struct timespec* finish) { in retrying_poll() argument
1021 async_safe_format_log(ANDROID_LOG_DEBUG, "libc", " %d retrying_poll\n", sock); in retrying_poll()
1029 struct pollfd fds = { .fd = sock, .events = events }; in retrying_poll()
1034 " %d retrying_poll timeout\n", sock); in retrying_poll()
1044 " %d retrying_poll got error %d\n",sock, n); in retrying_poll()
1051 if (getsockopt(sock, SOL_SOCKET, SO_ERROR, &error, &len) < 0 || error) { in retrying_poll()
1055 " %d retrying_poll dot error2 %d\n", sock, errno); in retrying_poll()
1063 " %d retrying_poll returning %d\n",sock, n); in retrying_poll()