Lines Matching refs:socket_fd
75 int socket_fd = -1; in ConnectSocket() local
77 socket_fd = socket(info->ai_family, info->ai_socktype, info->ai_protocol); in ConnectSocket()
78 if (socket_fd < 0) in ConnectSocket()
83 if (connect(socket_fd, info->ai_addr, info->ai_addrlen) == 0) in ConnectSocket()
87 close(socket_fd); in ConnectSocket()
88 socket_fd = -1; in ConnectSocket()
92 return socket_fd; in ConnectSocket()
148 int socket_fd = ConnectSocket(host, port); in ConnectBlocking() local
149 if (socket_fd <= 0) in ConnectBlocking()
152 auto ptr_ = brillo::FileStream::FromFileDescriptor(socket_fd, true, nullptr); in ConnectBlocking()
156 close(socket_fd); in ConnectBlocking()