| 61 | } |
| 62 | |
| 63 | Status CheckMetadataAndGetBodyLength(const Buffer& metadata, int64_t* body_length) { |
| 64 | const flatbuf::Message* fb_message = nullptr; |
| 65 | RETURN_NOT_OK(internal::VerifyMessage(metadata.data(), metadata.size(), &fb_message)); |
| 66 | *body_length = fb_message->bodyLength(); |
| 67 | if (*body_length < 0) { |
| 68 | return Status::IOError("Invalid IPC message: negative bodyLength"); |
| 69 | } |
| 70 | return Status::OK(); |
| 71 | } |
| 72 | |
| 73 | Status WritePadding(io::OutputStream* stream, int64_t nbytes) { |
| 74 | while (nbytes > 0) { |
no test coverage detected