• Home
  • Raw
  • Download

Lines Matching refs:sock

156 static int connect_with_timeout(int sock, const struct sockaddr* nsap, socklen_t salen,
158 static int retrying_poll(const int sock, short events, const struct timespec* finish);
869 static int connect_with_timeout(int sock, const sockaddr* nsap, socklen_t salen, in connect_with_timeout() argument
873 origflags = fcntl(sock, F_GETFL, 0); in connect_with_timeout()
874 fcntl(sock, F_SETFL, origflags | O_NONBLOCK); in connect_with_timeout()
876 res = connect(sock, nsap, salen); in connect_with_timeout()
884 LOG(INFO) << __func__ << ": " << sock << " send_vc"; in connect_with_timeout()
885 res = retrying_poll(sock, POLLIN | POLLOUT, &finish); in connect_with_timeout()
891 fcntl(sock, F_SETFL, origflags); in connect_with_timeout()
892 LOG(INFO) << __func__ << ": " << sock << " connect_with_const timeout returning " << res; in connect_with_timeout()
896 static int retrying_poll(const int sock, const short events, const struct timespec* finish) { in retrying_poll() argument
900 LOG(INFO) << __func__ << ": " << sock << " retrying_poll"; in retrying_poll()
907 struct pollfd fds = {.fd = sock, .events = events}; in retrying_poll()
910 LOG(INFO) << __func__ << ": " << sock << " retrying_poll timeout"; in retrying_poll()
916 PLOG(INFO) << __func__ << ": " << sock << " retrying_poll failed"; in retrying_poll()
922 if (getsockopt(sock, SOL_SOCKET, SO_ERROR, &error, &len) < 0 || error) { in retrying_poll()
924 PLOG(INFO) << __func__ << ": " << sock << " retrying_poll getsockopt failed"; in retrying_poll()
928 LOG(INFO) << __func__ << ": " << sock << " retrying_poll returning " << n; in retrying_poll()