Lines Matching refs:error
106 std::string* error);
118 bool InitializeProtocol(std::string* error);
126 size_t rx_length, int attempts, std::string* error);
132 std::string* error);
143 std::string* error) { in NewTransport() argument
146 if (!transport->InitializeProtocol(error)) { in NewTransport()
153 bool UdpTransport::InitializeProtocol(std::string* error) { in InitializeProtocol() argument
162 kMaxConnectAttempts, error); in InitializeProtocol()
166 *error = "invalid query response from target"; in InitializeProtocol()
176 kMaxTransmissionAttempts, error); in InitializeProtocol()
180 *error = "invalid initialization response from target"; in InitializeProtocol()
188 *error = android::base::StringPrintf("target reported invalid protocol version %d", in InitializeProtocol()
194 *error = android::base::StringPrintf("target reported invalid packet size %d", packet_size); in InitializeProtocol()
208 size_t rx_length, int attempts, std::string* error) { in SendData() argument
210 *error = "socket is closed"; in SendData()
230 rx_length, attempts, error); in SendData()
255 size_t rx_length, const int attempts, std::string* error) { in SendSinglePacketHelper() argument
257 error->clear(); in SendSinglePacketHelper()
262 *error = Socket::GetErrorMessage(); in SendSinglePacketHelper()
274 *error = Socket::GetErrorMessage(); in SendSinglePacketHelper()
277 *error = "protocol error: incomplete header"; in SendSinglePacketHelper()
290 error->append(rx_packet_.data() + kHeaderSize, rx_packet_.data() + bytes); in SendSinglePacketHelper()
316 *error = "no response from target"; in SendSinglePacketHelper()
321 *error = "target reported error: " + *error; in SendSinglePacketHelper()
330 std::string error; in Read() local
332 kMaxTransmissionAttempts, &error); in Read()
335 fprintf(stderr, "UDP error: %s\n", error.c_str()); in Read()
348 std::string error; in Write() local
350 0, kMaxTransmissionAttempts, &error); in Write()
353 fprintf(stderr, "UDP error: %s\n", error.c_str()); in Write()
378 std::unique_ptr<Transport> Connect(const std::string& hostname, int port, std::string* error) { in Connect() argument
379 return internal::Connect(Socket::NewClient(Socket::Protocol::kUdp, hostname, port, error), in Connect()
380 error); in Connect()
385 std::unique_ptr<Transport> Connect(std::unique_ptr<Socket> sock, std::string* error) { in Connect() argument
391 return UdpTransport::NewTransport(std::move(sock), error); in Connect()