Lines Matching refs:handle_
59 SyncSocket::SyncSocket() : handle_(kInvalidHandle) {} in SyncSocket()
68 DCHECK_EQ(socket_a->handle_, kInvalidHandle); in CreatePair()
69 DCHECK_EQ(socket_b->handle_, kInvalidHandle); in CreatePair()
96 socket_a->handle_ = handles[0]; in CreatePair()
97 socket_b->handle_ = handles[1]; in CreatePair()
117 const bool retval = CloseHandle(handle_); in Close()
118 handle_ = kInvalidHandle; in Close()
124 return SendHelper(handle_, buffer, length); in Send()
131 DCHECK_NE(handle_, kInvalidHandle); in Receive()
133 if (ReadFromFD(handle_, charbuffer, length)) in Receive()
144 DCHECK_NE(handle_, kInvalidHandle); in ReceiveWithTimeout()
150 if (handle_ >= FD_SETSIZE) in ReceiveWithTimeout()
168 FD_SET(handle_, &read_fds); in ReceiveWithTimeout()
174 select(handle_ + 1, &read_fds, NULL, NULL, &timeout_struct); in ReceiveWithTimeout()
183 DCHECK(FD_ISSET(handle_, &read_fds)); in ReceiveWithTimeout()
201 DCHECK_NE(handle_, kInvalidHandle); in Peek()
203 if (ioctl(handle_, FIONREAD, &number_chars) == -1) { in Peek()
217 DCHECK_NE(handle_, kInvalidHandle); in Shutdown()
218 return HANDLE_EINTR(shutdown(handle_, SHUT_RDWR)) >= 0; in Shutdown()
224 DCHECK_NE(handle_, kInvalidHandle); in Send()
226 const long flags = fcntl(handle_, F_GETFL, NULL); in Send()
230 fcntl(handle_, F_SETFL, flags | O_NONBLOCK); in Send()
233 const size_t len = SendHelper(handle_, buffer, length); in Send()
237 fcntl(handle_, F_SETFL, flags); in Send()