Lines Matching refs:sock
217 int sock = socket(PF_UNIX, SOCK_STREAM, 0);
218 PCHECK(sock >= 0) << "socket() failed";
220 int rv = SetNonBlocking(sock);
222 rv = SetCloseOnExec(sock);
225 return sock;
229 void SetupSocket(const std::string& path, int* sock, struct sockaddr_un* addr) {
230 *sock = SetupSocketOnly();
916 int sock;
961 SetupSocket(socket_target_path.value(), &sock, &addr);
963 if (bind(sock, reinterpret_cast<sockaddr*>(&addr), sizeof(addr)) < 0) {
965 CloseSocket(sock);
969 if (listen(sock, 5) < 0)
980 sock));