pulsar-client-cpp/lib/SharedBuffer.h
/**
     * Create a buffer with a copy of memory pointed by ptr
     */
Create a buffer with a copy of memory pointed by ptr
Create a buffer with a copy of memory pointed by ptr
static SharedBuffer copy(const char* ptr, uint32_t size) {
        SharedBuffer buf = allocate(size);
        buf.write(ptr, size);
        return buf;
    }
static SharedBuffer copy ( const char * ptr , uint32_t size ) { SharedBuffer buf = allocate ( size ) ; buf . write ( ptr , size ) ; return buf ; }
Create a buffer with a copy of memory pointed by ptr
Create a buffer with a copy of memory pointed by ptr