Lines Matching refs:bytes
60 static uint16_t ExtractUint16(const uint8_t* bytes) { in ExtractUint16() argument
61 return (static_cast<uint16_t>(bytes[0]) << 8) | bytes[1]; in ExtractUint16()
71 const uint8_t* bytes() const { return bytes_; } in bytes() function in udp::Header
229 ssize_t bytes = SendSinglePacketHelper(&header, tx_data, packet_data_length, rx_data, in SendData() local
234 if (bytes == -1) { in SendData()
236 } else if (static_cast<size_t>(bytes) < rx_length) { in SendData()
237 rx_data += bytes; in SendData()
238 rx_length -= bytes; in SendData()
247 ret += bytes; in SendData()
261 if (!socket_->Send({{header->bytes(), kHeaderSize}, {tx_data, tx_length}})) { in SendSinglePacketHelper()
267 ssize_t bytes = 0; in SendSinglePacketHelper() local
269 bytes = socket_->Receive(rx_packet_.data(), rx_packet_.size(), kResponseTimeoutMs); in SendSinglePacketHelper()
270 if (bytes == -1) { in SendSinglePacketHelper()
276 } else if (bytes < static_cast<ssize_t>(kHeaderSize)) { in SendSinglePacketHelper()
290 error->append(rx_packet_.data() + kHeaderSize, rx_packet_.data() + bytes); in SendSinglePacketHelper()
292 total_data_bytes += bytes - kHeaderSize; in SendSinglePacketHelper()
293 size_t rx_data_bytes = std::min<size_t>(bytes - kHeaderSize, rx_length); in SendSinglePacketHelper()
331 ssize_t bytes = SendData(kIdFastboot, nullptr, 0, reinterpret_cast<uint8_t*>(data), length, in Read() local
334 if (bytes == -1) { in Read()
337 } else if (static_cast<size_t>(bytes) > length) { in Read()
344 return bytes; in Read()
349 ssize_t bytes = SendData(kIdFastboot, reinterpret_cast<const uint8_t*>(data), length, nullptr, in Write() local
352 if (bytes == -1) { in Write()
355 } else if (bytes > 0) { in Write()