Home
last modified time | relevance | path

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

/system/core/fastboot/
Dtcp.cpp69 explicit TcpTransport(std::unique_ptr<Socket> sock) : socket_(std::move(sock)) {} in TcpTransport()
75 std::unique_ptr<Socket> socket_; member in tcp::TcpTransport
96 if (!socket_->Send(handshake_message.c_str(), kHandshakeLength)) { in InitializeProtocol()
104 if (socket_->ReceiveAll(buffer, kHandshakeLength, kHandshakeTimeoutMs) != kHandshakeLength) { in InitializeProtocol()
128 if (socket_ == nullptr) { in Read()
135 if (socket_->ReceiveAll(buffer, 8, 0) != 8) { in Read()
146 ssize_t bytes_read = socket_->ReceiveAll(data, length, 0); in Read()
156 if (socket_ == nullptr) { in Write()
163 if (!socket_->Send(std::vector<cutils_socket_buffer_t>{{header, 8}, {data, length}})) { in Write()
172 if (socket_ == nullptr) { in Close()
[all …]
Dudp.cpp114 explicit UdpTransport(std::unique_ptr<Socket> socket) : socket_(std::move(socket)) {} in UdpTransport()
133 std::unique_ptr<Socket> socket_; member in udp::UdpTransport
208 if (socket_ == nullptr) { in SendData()
260 if (!socket_->Send({{header->bytes(), kHeaderSize}, {tx_data, tx_length}})) { in SendSinglePacketHelper()
268 bytes = socket_->Receive(rx_packet_.data(), rx_packet_.size(), kResponseTimeoutMs); in SendSinglePacketHelper()
270 if (socket_->ReceiveTimedOut()) { in SendSinglePacketHelper()
281 if (socket_->ReceiveTimedOut()) { in SendSinglePacketHelper()
364 if (socket_ == nullptr) { in Close()
368 int result = socket_->Close(); in Close()
369 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.cc34 : socket_(socket_fd), phy_type_(phy_type) {} in LinkLayerSocketDevice()
39 size_t bytes_received = socket_.TryReceive(Link::kSizeBytes, received_->data()); in TimerTick()
49 size_t bytes_received = socket_.TryReceive(bytes_left_, received_->data() + offset_); in TimerTick()
63 socket_.TrySend(packet); in IncomingPacket()
Dlink_layer_socket_device.h51 net::PolledSocket socket_;
/system/netd/resolv/dns_responder/
Ddns_tls_frontend.h58 return socket_ != -1; in running()
85 android::base::unique_fd socket_; variable
Ddns_tls_frontend.cpp221 socket_ = std::move(s); in startServer()
225 if (listen(socket_.get(), 1) < 0) { in startServer()
226 APLOGI("failed to listen socket %d", socket_.get()); in startServer()
274 {.fd = socket_.get(), .events = POLLIN}}; in requestHandler()
293 accept4(socket_.get(), reinterpret_cast<sockaddr*>(&addr), &len, SOCK_CLOEXEC)); in requestHandler()
378 socket_.reset(); in stopServer()
Ddns_responder.cpp582 return socket_.get() != -1; in running()
607 socket_.reset(socket(ai->ai_family, ai->ai_socktype | SOCK_NONBLOCK, ai->ai_protocol)); in startServer()
608 if (socket_.get() < 0) { in startServer()
609 APLOGI("ignore creating socket %d failed", socket_.get()); in startServer()
612 enableSockopt(socket_.get(), SOL_SOCKET, SO_REUSEPORT).ignoreError(); in startServer()
613 enableSockopt(socket_.get(), SOL_SOCKET, SO_REUSEADDR).ignoreError(); in startServer()
615 if (bind(socket_.get(), ai->ai_addr, ai->ai_addrlen)) { in startServer()
637 ALOGI("adding socket %d to epoll", socket_.get()); in startServer()
638 if (!addFd(socket_.get(), EPOLLIN)) { in startServer()
639 ALOGE("failed to add the socket %d to epoll", socket_.get()); in startServer()
[all …]
Ddns_responder.h168 android::base::unique_fd socket_; variable
/system/core/init/
Dsubcontext.cpp234 if (!Socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0, &socket_, &subcontext_socket)) { in Fork()
244 socket_.reset(); in Fork()
277 socket_.reset(); in Restart()
282 if (auto result = SendMessage(socket_, subcontext_command); !result) { in TransmitMessage()
287 auto subcontext_message = ReadMessage(socket_); in TransmitMessage()
Dproperty_service.cpp288 SocketConnection(int socket, const ucred& cred) : socket_(socket), cred_(cred) {} in SocketConnection()
290 ~SocketConnection() { close(socket_); } in ~SocketConnection()
328 int result = TEMP_FAILURE_RETRY(send(socket_, &value, sizeof(value), 0)); in SendUint32()
332 int socket() { return socket_; } in socket()
338 getpeercon(socket_, &source_context); in source_context()
347 ufds[0].fd = socket_; in PollIn()
394 int result = TEMP_FAILURE_RETRY(recv(socket_, data, bytes_left, MSG_DONTWAIT)); in RecvFully()
411 int socket_; member in android::init::SocketConnection
Dsubcontext.h60 android::base::unique_fd socket_; variable