Skip to content

Instantly share code, notes, and snippets.

@shawncao
Created July 23, 2019 14:44
Show Gist options
  • Save shawncao/abc91b05ce6167ace226ead2383f2302 to your computer and use it in GitHub Desktop.
Save shawncao/abc91b05ce6167ace226ead2383f2302 to your computer and use it in GitHub Desktop.
expose byte_buffer in grpc
/// Is this ByteBuffer valid?
bool Valid() const { return (buffer_ != nullptr); }
+ grpc_byte_buffer* c_buffer() { return buffer_; }
private:
friend class SerializationTraits<ByteBuffer, void>;
friend class ServerInterface;
Context not available.
buffer_ = buf;
}
- grpc_byte_buffer* c_buffer() { return buffer_; }
grpc_byte_buffer** c_buffer_ptr() { return &buffer_; }
class ByteBufferPointer {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment