Hello world! I have few questions about bsonobjbuilder.1) How can i reset whole bsonobjbuilder? Is that proper way to do that bsonBuilder.bb().reset(); ?
2) I have void* const pBytes and size_t size. received over the internet from another bsonobjbuilder. How can i initialize bsonobjbuilder with this raw data?
3) I need binary data form bsonobjbuilder to send it over the internet, is that proper way to retrieve bin. data and actual size of it? bsonBuilder.bb().buf(); bsonBuilder.len(); ?Thanks!
bsonobj o = myBuilder.done();mySend( o.objdata(), o.objsize() );
Packet::Packet( const void* const _pData, int _size )
{
clear();
auto serializedBson = _bson::bsonobj( static_cast< const char* >( _pData ) );
mpBsonBuilder->appendElements( serializedBson );
}