Skip to content

Instantly share code, notes, and snippets.

@shawncao
Created July 23, 2019 14:44
Show Gist options
  • Select an option

  • Save shawncao/abc91b05ce6167ace226ead2383f2302 to your computer and use it in GitHub Desktop.

Select an option

Save shawncao/abc91b05ce6167ace226ead2383f2302 to your computer and use it in GitHub Desktop.

Revisions

  1. shawncao created this gist Jul 23, 2019.
    16 changes: 16 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@

    /// 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 {