Home
last modified time | relevance | path

Searched refs:socket_ (Results 1 – 9 of 9) sorted by relevance

/system/core/fastboot/device/
Dtcp_client.cpp64 if (socket_ == nullptr) { in Read()
69 if (socket_->ReceiveAll(buffer, 8, 0) == 8) { in Read()
73 socket_.reset(nullptr); in Read()
86 socket_->ReceiveAll(reinterpret_cast<char*>(data) + total_read, read_length, 0); in Read()
88 socket_.reset(nullptr); in Read()
103 if (socket_ == nullptr || len > SSIZE_MAX) { in Write()
111 if (!socket_->Send(std::vector<cutils_socket_buffer_t>{{header, 8}, {data, len}})) { in Write()
112 socket_.reset(nullptr); in Write()
127 if (socket_ == nullptr) { in Close()
130 socket_.reset(nullptr); in Close()
[all …]
Dtcp_client.h37 std::unique_ptr<Socket> socket_; variable
/system/core/fastboot/
Dtcp.cpp70 explicit TcpTransport(std::unique_ptr<Socket> sock) : socket_(std::move(sock)) {} in TcpTransport()
76 std::unique_ptr<Socket> socket_; member in tcp::TcpTransport
97 if (!socket_->Send(handshake_message.c_str(), kHandshakeLength)) { in InitializeProtocol()
105 if (socket_->ReceiveAll(buffer, kHandshakeLength, kHandshakeTimeoutMs) != kHandshakeLength) { in InitializeProtocol()
129 if (socket_ == nullptr) { in Read()
136 if (socket_->ReceiveAll(buffer, 8, 0) != 8) { in Read()
147 ssize_t bytes_read = socket_->ReceiveAll(data, length, 0); in Read()
157 if (socket_ == nullptr) { in Write()
164 if (!socket_->Send(std::vector<cutils_socket_buffer_t>{{header, 8}, {data, length}})) { in Write()
173 if (socket_ == nullptr) { in Close()
[all …]
Dudp.cpp115 explicit UdpTransport(std::unique_ptr<Socket> socket) : socket_(std::move(socket)) {} in UdpTransport()
134 std::unique_ptr<Socket> socket_; member in udp::UdpTransport
209 if (socket_ == nullptr) { in SendData()
261 if (!socket_->Send({{header->bytes(), kHeaderSize}, {tx_data, tx_length}})) { in SendSinglePacketHelper()
269 bytes = socket_->Receive(rx_packet_.data(), rx_packet_.size(), kResponseTimeoutMs); in SendSinglePacketHelper()
271 if (socket_->ReceiveTimedOut()) { in SendSinglePacketHelper()
282 if (socket_->ReceiveTimedOut()) { in SendSinglePacketHelper()
365 if (socket_ == nullptr) { in Close()
369 int result = socket_->Close(); in Close()
370 socket_.reset(); in Close()
/system/logging/logd/
DLogListener.cpp35 LogListener::LogListener(LogBuffer* buf) : socket_(GetLogSocket()), logbuf_(buf) {} in LogListener()
38 if (socket_ <= 0) { in StartListener()
65 ssize_t n = recvmsg(socket_, &hdr, 0); in HandleData()
DLogListener.h31 int socket_; variable
/system/core/init/
Dsubcontext.cpp196 if (!Socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0, &socket_, &subcontext_socket)) { in Fork()
206 socket_.reset(); in Fork()
249 socket_.reset(); in Restart()
271 if (auto result = SendMessage(socket_.get(), subcontext_command); !result.ok()) { in TransmitMessage()
276 auto subcontext_message = ReadMessage(socket_.get()); in TransmitMessage()
Dsubcontext.h65 android::base::unique_fd socket_; variable
Dproperty_service.cpp233 SocketConnection(int socket, const ucred& cred) : socket_(socket), cred_(cred) {} in SocketConnection()
272 if (!socket_.ok()) { in SendUint32()
275 int result = TEMP_FAILURE_RETRY(send(socket_.get(), &value, sizeof(value), 0)); in SendUint32()
281 if (getpeercon(socket_.get(), &c_source_context) != 0) { in GetSourceContext()
289 [[nodiscard]] int Release() { return socket_.release(); } in Release()
298 .fd = socket_.get(), in PollIn()
345 int result = TEMP_FAILURE_RETRY(recv(socket_.get(), data, bytes_left, MSG_DONTWAIT)); in RecvFully()
362 unique_fd socket_; member in android::init::SocketConnection