Home
last modified time | relevance | path

Searched refs:socket_ (Results 1 – 7 of 7) 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.h70 base::ScopedFD socket_; variable
/system/core/init/
Dproperty_service.cpp217 : socket_(socket), cred_(cred) {} in SocketConnection()
220 close(socket_); in ~SocketConnection()
259 int result = TEMP_FAILURE_RETRY(send(socket_, &value, sizeof(value), 0)); in SendUint32()
264 return socket_; in socket()
274 ufds[0].fd = socket_; in PollIn()
316 int result = TEMP_FAILURE_RETRY(recv(socket_, data, bytes_left, MSG_DONTWAIT)); in RecvFully()
328 int socket_; member in SocketConnection
/system/netd/tests/dns_responder/
Ddns_responder.cpp525 socket_(-1), epoll_fd_(-1), terminate_(false) { } in DNSResponder()
563 return socket_ != -1; in running()
634 socket_ = s; in startServer()
657 close(socket_); in stopServer()
659 socket_ = -1; in stopServer()
689 len = recvfrom(socket_, buffer, sizeof(buffer), 0, in requestHandler()
701 len = sendto(socket_, response, response_len, 0, in requestHandler()
Ddns_responder.h126 int socket_; variable