Lines Matching refs:socketFd
61 int socketFd = -1; in createSocket() local
63 if ((socketFd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { in createSocket()
71 if (::connect(socketFd, (struct sockaddr*)&addr, sizeof(addr)) < 0) { in createSocket()
73 if (::close(socketFd)) { in createSocket()
76 socketFd = -1; in createSocket()
80 return socketFd; in createSocket()
83 static inline void closeSocket(const int socketFd) { in closeSocket() argument
84 if (socketFd >= 0) { in closeSocket()
85 if(::close(socketFd)) { in closeSocket()
92 int socketFd = createSocket(); in sendConnectionEvent() local
93 if (socketFd < 0) { in sendConnectionEvent()
109 (sent = ::send(socketFd, data.c_str() + (data.length() - remain), in sendConnectionEvent()
118 closeSocket(socketFd); in sendConnectionEvent()