Home
last modified time | relevance | path

Searched refs:socket_ (Results 1 – 13 of 13) 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/bt/service/ipc/
Dipc_handler_linux.cc69 socket_.reset(server_fd); in Run()
96 socket_.swap(server_socket); in Run()
100 CHECK(socket_.is_valid()); in Run()
124 shutdown(socket_.get(), SHUT_RDWR); in Stop()
125 socket_.reset(); in Stop()
136 CHECK(socket_.is_valid()); in StartListeningOnThread()
142 int status = listen(socket_.get(), SOMAXCONN); in StartListeningOnThread()
159 int client_socket = accept4(socket_.get(), nullptr, nullptr, SOCK_NONBLOCK); in StartListeningOnThread()
Dipc_handler_linux.h69 base::ScopedFD socket_; variable
/system/bt/vendor_libs/test_vendor_lib/model/devices/
Dlink_layer_socket_device.cc30 : socket_(socket_fd), phy_type_(phy_type) {} in LinkLayerSocketDevice()
36 size_t bytes_received = socket_.TryReceive(kSizeBytes, packet_size->data()); in TimerTick()
47 size_t bytes_received = socket_.TryReceive(bytes_left_, received_->data() + offset_); in TimerTick()
72 if (socket_.TrySend(size_bytes) == kSizeBytes) { in IncomingPacket()
74 socket_.TrySend(payload_bytes); in IncomingPacket()
Dlink_layer_socket_device.h53 net::PolledSocket socket_;
/system/core/logd/
DLogListener.cpp35 LogListener::LogListener(LogBuffer* buf) : socket_(GetLogSocket()), logbuf_(buf) {} in LogListener()
38 if (socket_ <= 0) { in StartListener()
69 ssize_t n = recvmsg(socket_, &hdr, 0); in HandleData()
DLogListener.h31 int socket_; variable
/system/core/init/
Dsubcontext.cpp194 if (!Socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0, &socket_, &subcontext_socket)) { in Fork()
204 socket_.reset(); in Fork()
241 socket_.reset(); in Restart()
255 if (auto result = SendMessage(socket_, subcontext_command); !result.ok()) { in TransmitMessage()
260 auto subcontext_message = ReadMessage(socket_); in TransmitMessage()
Dsubcontext.h59 android::base::unique_fd socket_; variable
Dproperty_service.cpp249 SocketConnection(int socket, const ucred& cred) : socket_(socket), cred_(cred) {} in SocketConnection()
287 if (!socket_.ok()) { in SendUint32()
290 int result = TEMP_FAILURE_RETRY(send(socket_, &value, sizeof(value), 0)); in SendUint32()
296 if (getpeercon(socket_, &c_source_context) != 0) { in GetSourceContext()
304 [[nodiscard]] int Release() { return socket_.release(); } in Release()
311 ufds[0].fd = socket_; in PollIn()
358 int result = TEMP_FAILURE_RETRY(recv(socket_, data, bytes_left, MSG_DONTWAIT)); in RecvFully()
375 unique_fd socket_; member in android::init::SocketConnection